Reversible steganographic method, system and electronic device based on frequency domain image information hiding
By performing frequency domain processing and Hamming check matrix operations on JPEG images, the problem of insufficient image quality and concealment after JPEG image steganography is solved, and high-accuracy information extraction and image processing robustness are achieved.
Patent Information
- Application Number
- CN202411044606.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-01
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2044-08-01
AI Technical Summary
In the existing technology, the steganographic image quality, concealment and accuracy of extracted information of JPEG images are insufficient. Especially after lossless compression, format transformation, scaling or rotation of the steganographic image, the steganography effect is not good.
A reversible steganography method for image information hiding based on the frequency domain is adopted. The original JPEG image is divided into blocks and color space converted, discrete cosine transform and quantization are performed, and the Hamming check matrix is used for bit-by-bit XOR operation to modify the AC component coefficients. , realize information embedding, and perform inverse discrete cosine transform, inverse quantization and inverse scrambling during the extraction process.
The quality and concealment of the image after steganography are improved, ensuring a high accuracy of information extraction after image processing operations. The quality of the image after steganography is almost the same as the original image, which increases the security and concealment of information hiding.
Smart Images

Figure CN118587077B
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a reversible steganographic method, system and electronic device for hiding image information based on frequency domain. Background Art
[0002] At present, due to the widespread application of computer networks, more and more electronic resources can be quickly transmitted through the network. Therefore, how to protect the copyright of electronic resources has become particularly important. This issue has also become one of the key issues in the field of information security. Compared with digital watermarks that destroy the image structure and have poor embedded information concealment, steganography has been widely concerned and used. Steganography technology can embed specific information into information carriers and is not easy to be detected. It is widely used in the fields of copyright protection and data attachment.
[0003] The LSB replacement algorithm is the basic algorithm for digital image steganography. It performs steganography by storing secret information in the least significant bit of a pixel. It is also a commonly used algorithm for steganography of spatial domain data. However, this method is performed within the spatial domain data framework and is only applicable to BMP and GIF format files. Spatial domain digital image steganography technologies such as the LSB algorithm are not suitable for processing frequency domain data after JPEG compression.
[0004] In the related technology, there is a reversible information hiding method for JPEG images, which reduces the visual distortion of the secret image by embedding a distortion estimation model, and improves the encryption security and image quality stability through Paillier homomorphic encryption technology. However, when a large amount of secret information is embedded in a JPEG image and when the steganographic image is subjected to lossless compression, format transformation, scaling or rotation and other operations, the quality, concealment of the steganographic image and the accuracy of information extraction need to be improved. Summary of the invention
[0005] The present invention aims to solve at least one of the technical problems existing in the prior art. To this end, the present invention proposes a product attribute standardization management method, device, electronic device and storage medium.
[0006] In a first aspect, an embodiment of the present application provides a reversible steganographic method for hiding image information based on frequency domain, comprising:
[0007] Obtain a JPEG original image, divide the JPEG original image into blocks and convert the color space from RGB to YCbCr to obtain a brightness component block;
[0008] Performing discrete cosine transform on the luminance component block to convert a discrete signal sequence of multiple sampling points into frequency domain coefficients of multiple cosine basis functions;
[0009] Mapping the frequency domain coefficients to a discrete value set, and quantizing the value set according to a preset standard quantization table to obtain an AC component coefficient;
[0010] Acquire secret information to be embedded, perform matrix coding on the secret information, and compare the regional secret information based on the matrix coding to form a Hamming check matrix;
[0011] Perform bit-by-bit XOR according to the Hamming check matrix to determine and modify the corresponding AC component coefficient to obtain the steganographic frequency domain coefficient;
[0012] The steganographic frequency domain coefficients are sequentially subjected to inverse discrete cosine transform, inverse quantization and inverse scrambling processing to obtain a hidden information image.
[0013] According to some embodiments of the present application, performing discrete cosine transform on the luminance component block to convert a discrete signal sequence of multiple sampling points into frequency domain coefficients of multiple cosine basis functions includes:
[0014] According to the brightness component block, a pixel value of the image and a value range of a horizontal frequency of the two-dimensional wave and a vertical frequency of the two-dimensional wave are obtained;
[0015] A coefficient matrix corresponding to the frequency domain coefficient is obtained according to the pixel value, the horizontal frequency of the two-dimensional wave, and the vertical frequency of the two-dimensional wave.
[0016] According to some embodiments of the present application, obtaining a coefficient matrix corresponding to the frequency domain coefficient according to the pixel value, the horizontal frequency of the two-dimensional wave, and the vertical frequency of the two-dimensional wave includes:
[0017] The size N of the image block is obtained according to the brightness component block to determine the supplementary coefficient , where the supplementary coefficient for
[0018]
[0019] In the formula, is the horizontal frequency of the two-dimensional wave, The value range is ;
[0020] According to the supplementary coefficients, the horizontal frequency of the two-dimensional wave and the vertical frequency of the two-dimensional wave, a conversion matrix A is obtained, wherein the conversion matrix A is
[0021]
[0022] In the formula, is the horizontal frequency of the two-dimensional wave, is the vertical frequency of the two-dimensional wave, and The value range is ;
[0023] According to the conversion matrix A and the pixel value , we get the coefficient matrix F, where .
[0024] According to some embodiments of the present application, mapping the frequency domain coefficients to a discrete value set, and quantizing the value set according to a preset standard quantization table to obtain an AC component coefficient, includes:
[0025] Obtaining a quality factor of the JPEG original image, and determining a standard matrix quantization table for frequency domain data quantization according to the quality factor;
[0026] Based on the quantization table, all elements of the value set are divided correspondingly, and the AC component coefficients are obtained in a quantization order from low frequency to high frequency.
[0027] According to some embodiments of the present application, performing bit-by-bit XOR according to the Hamming check matrix to determine and modify the corresponding AC component coefficient to obtain the steganographic frequency domain coefficient includes:
[0028] Select image pixels and channels, and determine whether the corresponding frequency domain coefficient is a positive odd number or a negative even number. If so, assign the corresponding bit of the matrix code to a positive number; if not, assign the corresponding bit to zero;
[0029] Based on the bit-by-bit XOR of the matrix code after the assignment and the Hamming check matrix, the corresponding AC component coefficient is determined and modified to obtain the steganographic frequency domain coefficient.
[0030] According to some embodiments of the present application, the bit-by-bit XOR of the matrix code after the assignment and the Hamming check matrix is performed to determine and modify the corresponding AC component coefficient to obtain the steganographic frequency domain coefficient, including:
[0031] A binary number is obtained based on bit-by-bit XOR, and the binary number is converted to obtain a corresponding decimal value;
[0032] Based on the decimal value, the corresponding AC component coefficient position is determined and the value is modified to write the secret information.
[0033] According to some embodiments of the present application, determining the corresponding AC component coefficient position based on the decimal value and modifying the value to write secret information includes:
[0034] If the corresponding AC component coefficient to be modified is a negative number, add 1 to the corresponding value of the coefficient;
[0035] If the corresponding AC component coefficient to be modified is a positive number, subtract 1 from the corresponding value of the coefficient;
[0036] If the corresponding value of the modified AC component coefficient is 0, then XOR is performed again to determine another corresponding AC component coefficient.
[0037] In a second aspect, an embodiment of the present application provides a reversible steganographic system based on frequency domain image information hiding, the system comprising:
[0038] The image preprocessing module is configured to obtain a JPEG original image, divide the JPEG original image into blocks, and convert the color space from RGB to YCbCr to obtain a brightness component block;
[0039] A space-frequency domain conversion process is configured to perform a discrete cosine transform on the luminance component block to convert a discrete signal sequence of a plurality of sampling points into frequency domain coefficients of a plurality of cosine basis functions;
[0040] A data quantization module is configured to obtain a quality factor of the JPEG original image, determine a standard matrix quantization table for frequency domain data quantization according to the quality factor, divide all elements of the value set based on the quantization table, and obtain an AC component coefficient in a quantization order from low frequency to high frequency;
[0041] A check matrix production module is configured to perform matrix encoding on the secret information to be embedded according to the acquired secret information, and form a Hamming check matrix by comparing the regional secret information based on the matrix encoding;
[0042] A data embedding module is configured to perform bit-by-bit XOR according to the Hamming check matrix, determine and modify the corresponding AC component coefficient to obtain a steganographic frequency domain coefficient;
[0043] The image restoration module is configured to perform inverse discrete cosine transform, inverse quantization and inverse scrambling on the steganographic frequency domain coefficients in sequence to obtain an image of the hidden information.
[0044] In a third aspect, an embodiment of the present application further provides an electronic device, including:
[0045] at least one processor; and
[0046] a memory communicatively connected to the at least one processor; wherein,
[0047] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can perform the steps of the reversible steganography method based on frequency domain image information hiding described in any one of the embodiments of the first aspect above.
[0048] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium having computer program instructions stored thereon, and when the computer program instructions are executed by a processor, the steps of the reversible steganographic method for hiding image information based on frequency domain described in any one of the embodiments of the first aspect above are implemented.
[0049] Compared with the prior art, the technical solution provided by the embodiment of the present invention includes at least the following beneficial effects:
[0050] 1) The original image is divided into blocks and the color space is converted to obtain the brightness component, and then a discrete cosine transform is performed to convert the two-dimensional image from the spatial domain to the frequency domain. The frequency domain coefficients are mapped to a discrete numerical set, and the numerical set is quantized according to a preset standard quantization table to obtain the AC component coefficient. The hidden information is stegostenized into the AC component coefficient. Due to the lower quantization level of the AC component coefficient, more subtle changes can be retained, providing better steganographic security. At the same time, the reduction in data volume can provide a larger embedding capacity for steganography.
[0051] 2) By introducing the Hamming check idea, the hidden information is XORed with the check matrix P bit by bit, and the corresponding AC component coefficients are determined and modified to embed all the hidden information into steganography. At the same time, the frequency domain coefficients after steganography are subjected to inverse discrete cosine transform, inverse quantization and inverse scrambling in sequence. In the data extraction process, only the pseudo-random sequence key needs to be provided. After lossless compression, format transformation, scaling or rotation of the steganographic image, the accuracy of the extracted information is high, and the extracted information is consistent with the embedded information. At the same time, the quality of the steganographic image is almost the same as that of the original image.
[0052] 3) By matrix encoding the secret information, each encoding method of the matrix encoding can be represented by an ordered array. When the secret message is embedded in the AC component coefficient, only one position is modified to improve the embedding efficiency, so that each modification can embed more secret bits, and the regional secret information is compared to form a Hamming check matrix. The hidden information is written based on the Hamming check matrix by bit-by-bit XOR, and then scrambled, which greatly increases the security and concealment of information hiding.
[0053] Additional aspects and advantages of the present invention will be given in part in the following description and in part will be obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0055] Figure 1 is a flow chart of a reversible steganographic method for hiding image information based on frequency domain according to an embodiment of the present application;
[0056] Figure 2 is a flowchart of a reversible steganographic information processing according to an embodiment of the present application;
[0057] Figure 3 is a schematic diagram of color conversion and sampling according to an embodiment of the present application;
[0058] Figure 4 is a schematic diagram of a discrete cosine transform and quantization process according to an embodiment of the present application;
[0059] Figure 5 is a schematic diagram of a rotation transformation of an image after steganography according to an embodiment of the present application;
[0060] Figure 6 is a block diagram of a reversible steganography system for hiding image information based on frequency domain according to an embodiment of the present application;
[0061] Figure 7 is a block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0062] The embodiments of the present invention are described in detail below. The embodiments described with reference to the accompanying drawings are exemplary. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0063] It should be noted that, unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.
[0064] See also Figures 1 to 5 This embodiment provides a reversible steganographic method for hiding image information based on frequency domain, comprising:
[0065] Step S100: obtaining a JPEG original image, dividing the JPEG original image into blocks and converting the color space from RGB to YCbCr to obtain a brightness component block;
[0066] In this step, it is necessary to explain that digital image steganography is an information hiding technology that aims to embed secret data into an image to achieve copyright protection or invisible communication. The digital image steganography system consists of information embedding, transmission, and extraction.
[0067] like Figure 2 As shown, the general digital image steganography implementation first requires a stable embedding algorithm. After preprocessing the message, set an embedding key K1 and input it and the image carrier P into the embedding algorithm, run the embedding algorithm, and write the message into the carrier P. If it is necessary to extract the hidden information, it is necessary to use the corresponding extraction algorithm and input the correct extraction key K2 to obtain the preprocessed message. Then, the message is de-preprocessed to obtain the original message before embedding. The digital image steganography technology includes spatial domain and frequency domain digital image steganography technology. The method steps of this embodiment are based on frequency domain digital images to achieve steganography.
[0068] Optionally, a JPEG original image is obtained. It is understandable that the JPEG original image may also be a JPG format file. In order to make the hidden information more effectively stego-written into the image and to ensure the picture quality of the original image after stego-writing, the JPEG original image needs to be pre-processed. The pre-processing mainly includes dividing the JPEG original image into blocks and converting the color space from RGB to YCbCr to obtain a brightness component block.
[0069] For example, Figure 2 As shown, the original image is divided into 8×8 blocks, and the color space of the image is converted from RGB to YCbCr. YCbCr is a color encoding system that separates the brightness and chromaticity of the image and represents color information in a more effective way. Among them, Y represents brightness, Cb represents the blue concentration offset of the color, and Cr represents the red concentration offset of the color. The formula for converting RGB to YCbCr is:
[0070]
[0071] In the formula, R represents red, B represents blue, and G represents green;
[0072] For example, 4:2:0 sampling is usually used in the two-color space conversion process to obtain the luminance component Y (ie, the luminance component block).
[0073] Step S200: performing discrete cosine transform on the luminance component block to convert a discrete signal sequence of multiple sampling points into frequency domain coefficients of multiple cosine basis functions;
[0074] In this step, discrete cosine transform is performed on the brightness component Y obtained in step S100. It should be explained that discrete cosine transform is also called DCT transform. Discrete cosine transform is a mathematical transformation used for signal processing and data compression. According to the brightness component block, the pixel value of the image and the value range of the horizontal frequency of the two-dimensional wave and the vertical frequency of the two-dimensional wave are obtained; according to the pixel value, the horizontal frequency of the two-dimensional wave and the vertical frequency of the two-dimensional wave, the coefficient matrix corresponding to the frequency domain coefficient is obtained.
[0075] Optional, based on the pixel value of the image , horizontal frequency of two-dimensional wave And the vertical frequency of the two-dimensional wave The coefficient matrix corresponding to the frequency domain coefficients is obtained, including:
[0076] The size N of the image block is obtained according to the brightness component block to determine the supplementary coefficient , where the supplementary coefficient for
[0077] (1)
[0078] In the formula, is the horizontal frequency of the two-dimensional wave, The value range is , N is the size of the image block;
[0079] According to the supplementary coefficient, the horizontal frequency of the two-dimensional wave and the vertical frequency of the two-dimensional wave, the conversion matrix A is obtained, where the conversion matrix A is
[0080] (2)
[0081] In the formula, is the horizontal frequency of the two-dimensional wave, is the vertical frequency of the two-dimensional wave, and The value range is ;
[0082] According to the transformation matrix A and the pixel value , we get the coefficient matrix F, where (3).
[0083] For example, in a discrete cosine transform process, Figure 4As shown, first, the original grayscale and brightness values in the image are represented by 8 bits, that is, the range of (0,255). Most of them are distributed around 128. Therefore, first subtract 128 from the original grayscale value / brightness value. In this way, there will be more values 0, which is conducive to compression. At this time, the range becomes (-128,127). Then, the conversion matrix of the discrete cosine transform can be obtained through the above formulas (1), (2), and (3). The conversion matrix is used to convert to frequency domain coefficients, and the coefficient matrix F can be obtained from the image f.
[0084] Step S300: mapping the frequency domain coefficients to a discrete value set, and quantizing the value set according to a preset standard quantization table to obtain AC component coefficients;
[0085] In this step, the quality factor of the JPEG original image is obtained, and the standard matrix quantization table for quantizing the frequency domain data is determined according to the quality factor. All elements of the value set based on the quantization table are divided accordingly, and the AC component coefficients are obtained in a quantization order from low frequency to high frequency.
[0086] It should be noted that the selection of the quantization matrix is directly related to whether the secret information can be successfully embedded and whether the secret information can be successfully extracted. It mainly represents the quantization step. For this reason, a quality factor QF is required. The value of QF is between 0 and 100. The quality factor QF can be obtained by consulting relevant historical experience data. Only when the QF corresponding to the quantization matrix is selected more accurately, the embedding and extraction effects will be optimal.
[0087] Continue reading Figure 4 In this example, when the selected quality factor QF is 80, the corresponding standard quantization matrix for frequency domain data quantization is:
[0088]
[0089] By dividing all the elements of the numerical set of discrete cosine transform coefficients correspondingly through the quantization table, the discrete cosine transform coefficients are quantized (arranged from low frequency to high frequency).
[0090] In this way, by mapping the discrete cosine transform coefficients to a discrete set of values and quantizing components of different frequencies to different degrees, the amount of data in the high-frequency details can be reduced, thereby achieving image compression. Quantizing the high-frequency details to a greater extent can achieve a higher compression ratio while maintaining good visual quality. During the quantization process, a smaller quantization level retains more detail information, and a larger quantization level reduces detail information, thereby converting the frequency band information into data.
[0091] It needs to be explained that discrete cosine transform and quantization can obtain quantized discrete cosine coefficients. In frequency domain digital image steganography, secret information is usually embedded in the low-frequency components of the image. A lower quantization level can retain more subtle changes and provide better steganographic security. The reduction in data volume can provide a larger embedding capacity for steganography, but it may affect image quality.
[0092] It is also necessary to explain that in this step, a pseudo-random sequence can also be used to scramble the original image. The scrambling pseudo-random key can be selected according to actual needs. For example, the scrambling pseudo-random key is set to 1234. After scrambling, the features of the original image have been completely erased, which randomizes the pixel distribution and effectively hides the pattern and structure of the information, greatly increasing the security of information hiding.
[0093] Step S400: obtaining secret information to be embedded, performing matrix coding on the secret information, and comparing the regional secret information based on the matrix coding to form a Hamming check matrix;
[0094] In this step, the secret information to be embedded is obtained and matrix encoding is performed on the secret information. It should be explained that the basic idea of matrix encoding is to use n-bit LSB to represent k-bit information. For example, if the original LSB of the image is , the LSB of the information to be written is , then the structure obtained by XORing each two bits of a is compared with the corresponding information. If they are not equal, the LSB is modified, and if they are equal, it remains unchanged. It is easy to see that in the example, only one bit needs to be changed at most to achieve the effect of data embedding. Each encoding method of matrix encoding can be used with an ordered array To express.
[0095] It should be noted that the matrix code used in this step is , the matrix encoding of secret information is to embed the k-bit secret message into The purpose of matrix coding is to improve the embedding efficiency so that each LSB modification can embed more secret bits. At the same time, the consistent check matrix of the Hamming code is used in the embedding and extraction process. This coding method is also called Hamming steganography. Unlike the Hamming code correction, matrix coding does not require the check code calculated from the frequency domain coefficients to be added to the frequency domain coefficients for error correction, but directly uses the calculated check code as the secret information.
[0096] Step S500: performing bit-by-bit XOR according to the Hamming check matrix, determining and modifying the corresponding AC component coefficient to obtain the steganographic frequency domain coefficient;
[0097] In this step, it is necessary to first select image pixels and channels. In each image pixel and channel, determine whether the corresponding frequency domain coefficient is a positive odd number or a negative even number. If so, assign the corresponding bit of the matrix code to a positive number; if not, assign the corresponding bit to zero. Based on the assigned matrix code and the Hamming check matrix, perform bit-by-bit XOR to determine and modify the corresponding AC component coefficient to obtain the steganographic frequency domain coefficient.
[0098] Specifically, according to step S400, after matrix encoding the hidden information, a binary number is obtained based on bit-by-bit XOR with the Hamming check matrix, and the binary number is converted into a corresponding decimal value; then, according to the size of the decimal value, the corresponding AC component coefficient position is determined and the value is modified to write the secret information; if the corresponding AC component coefficient to be modified is a negative number, 1 is added to the corresponding value of the coefficient; if the corresponding AC component coefficient to be modified is a positive number, 1 is subtracted from the corresponding value of the coefficient; if the corresponding value of the modified AC component coefficient is 0, XOR is performed again to determine another corresponding AC component coefficient.
[0099] Exemplarily, the matrix code corresponding to the hidden information and the check matrix P By performing bit-by-bit XOR operations, we can get a three-digit binary number, which can be converted into a decimal number. n , and then to the n The DCT value of the bit is modified. If the original DCT coefficient at that bit is a negative number, add 1 to the coefficient; if it is a positive number, subtract 1; if the modified DCT coefficient becomes 0, another position should be selected for modification, and the above steps are repeated until all the hidden information is embedded and modified.
[0100] Specifically, suppose a piece of information has 15 numbers in total, corresponding to the binary 0001, 0010, 0011, ... 1111, and all the numbers whose lowest bit is 1 are selected for XOR operation, that is:
[0101]
[0102] We can get 1 bit of information. Then select all the binary numbers whose second digit is 1 and perform XOR operation:
[0103]
[0104] We can also get 1 bit of information. Similarly, we can select all binary numbers whose third digit is 1 and whose fourth digit is 1 and perform XOR operation on them to get 2 bits of information. In summary, we can get 4 bits of information in total.
[0105] If the 4 bits of information match the ciphertext, there is no need to change the ciphertext. If they do not match, corrections need to be made to find a location where the information does not match.
[0106] As shown in Table 1, the modification principle of this step is The frequency domain coefficients are bit-by-bit, and only one bit needs to be changed at most to obtain k bits of ciphertext information. The grouping size of the frequency domain coefficients can be selected by yourself, and the modification method is to directly reduce 1 by the absolute value.
[0107] Table 1 shows the frequency domain coefficient correction rules
[0108]
[0109] Step S600: performing inverse discrete cosine transform, inverse quantization and inverse scrambling processing on the steganographic frequency domain coefficients in sequence to obtain a hidden information image.
[0110] In this step, in order to restore the frequency domain image in which the secret information is written, it is necessary to perform inverse discrete cosine transform, inverse quantization and inverse scrambling processing on the steganographic frequency domain coefficients in turn to obtain a camouflaged image, that is, an image with hidden information. It should be understood that inverse discrete cosine transform, inverse quantization and inverse scrambling processing are actually the inverse processes of discrete cosine transform, quantization and scrambling.
[0111] For example, the accuracy and PSNR of the extracted image after steganography according to the above steps are shown in Table 2.
[0112] Table 2 shows the accuracy and PSNR of image information extracted after steganography.
[0113]
[0114] As can be seen from Table 2, the accuracy of this steganography is 99.98%, and only a small amount of data cannot be correctly extracted during the extraction process. The PSNR of this process is 35.1062, which is within the acceptable image quality range.
[0115] In an example, in order to verify the robustness of the above method after steganography of an image, the image is rotated as an example. Figure 5 As shown, the original image is rotated by an angle n, and then imported into MATLAB, and rotated back to 1896×1280 format through MATLAB, that is, rotated back to the original image format. Then the processed image is run through the embedding and extraction algorithm, and finally the accuracy and image quality parameter PSNR of the processed image are obtained as shown in Table 3:
[0116] Table 3 shows the robustness of the image rotation verification model
[0117]
[0118] It can be seen from Table 3 that image rotation does not affect the accuracy and image quality of embedding and transmission, which is the same as the image without any processing. Therefore, rotation does not affect the robustness of the model. Of course, for compression and other image processing, the accuracy of extracting information is high, which will not be repeated here.
[0119] In the above method steps, the original image is divided into blocks and the color space is converted to obtain the brightness component, and then a discrete cosine transform is performed to convert the two-dimensional image from the spatial domain to the frequency domain, and the frequency domain coefficients are mapped to a discrete numerical set, and the numerical set is quantized according to a preset standard quantization table to obtain the AC component coefficient, and the hidden information is hidden in the AC component coefficient. Due to the lower quantization level of the AC component coefficient, more subtle changes can be retained, providing better steganographic security. At the same time, the reduction in data volume can provide a larger embedding capacity for steganography.
[0120] At the same time, by introducing the Hamming check idea, the hidden information and the check matrix P are subjected to bit-by-bit XOR operation, the corresponding AC component coefficients are determined and modified to realize the embedding of all hidden information into steganography, and the frequency domain coefficients after steganography are subjected to inverse discrete cosine transform, inverse quantization and inverse scrambling processing in turn. In the data extraction process, only a pseudo-random sequence key needs to be provided. After lossless compression, format conversion, scaling or rotation of the steganographic image, the accuracy of the extracted information is high, and the extracted information is consistent with the embedded information. At the same time, the quality of the steganographic image is almost the same as that of the original image.
[0121] In addition, by matrix encoding the secret information, each encoding method of the matrix encoding can be represented by an ordered array. When the secret message is embedded in the AC component coefficient, only one position is modified to improve the embedding efficiency, so that each modification can embed more secret bits, and the regional secret information is compared to form a Hamming check matrix. The hidden information is written based on the Hamming check matrix by bit-by-bit XOR, and then scrambled, which greatly increases the security and concealment of information hiding.
[0122] See also Figure 6 In some embodiments, a reversible steganographic system 200 for hiding image information based on frequency domain is provided, and the system 200 comprises:
[0123] The image preprocessing module 210 is configured to obtain a JPEG original image, divide the JPEG original image into blocks, and convert the color space from RGB to YCbCr to obtain a brightness component block;
[0124] The space-frequency domain conversion process 220 is configured to perform a discrete cosine transform on the luminance component block to convert a discrete signal sequence of a plurality of sampling points into frequency domain coefficients of a plurality of cosine basis functions;
[0125] The data quantization module 230 is configured to obtain a quality factor of the JPEG original image, determine a standard matrix quantization table for frequency domain data quantization according to the quality factor, divide all elements of the value set based on the quantization table, and obtain AC component coefficients in a quantization order from low frequency to high frequency;
[0126] The check matrix generation module 240 is configured to perform matrix encoding on the secret information to be embedded according to the acquired secret information, and form a Hamming check matrix by comparing the regional secret information based on the matrix encoding;
[0127] The data embedding module 250 is configured to perform bit-by-bit XOR according to the Hamming check matrix, determine and modify the corresponding AC component coefficient to obtain the steganographic frequency domain coefficient;
[0128] The image restoration module 260 is configured to perform inverse discrete cosine transform, inverse quantization and inverse scrambling on the steganographic frequency domain coefficients in sequence to obtain an image of the hidden information.
[0129] See also Figure 7 In some embodiments, an electronic device is also proposed, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps of a reversible steganographic method for hiding image information based on frequency domain proposed in the aforementioned embodiment of the present application are implemented.
[0130] Figure 7 A block diagram of an exemplary electronic device suitable for implementing the embodiments of the present application is shown. Figure 7 The electronic device 12 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0131] like Figure 7 As shown, the electronic device 12 is in the form of a general-purpose computing device, and the components of the electronic device 12 may include but are not limited to: one or more processors or processing units 16, a memory 28, and a bus 18 connecting different system components (including the memory 28 and the processing unit 16).
[0132] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of a variety of bus structures. For example, these architectures include but are not limited to Industry Standard Architecture (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnection (PCI) bus.
[0133] The electronic device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device 12, including volatile and non-volatile media, removable and non-removable media.
[0134] The memory 28 may include computer system readable media in the form of volatile memory, such as random access memory 30 (RAM) and / or cache memory 32. The electronic device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, the storage system 34 may be used to read and write non-removable, non-volatile magnetic media ( Figure 7 Not shown, usually called a "hard drive").
[0135] although Figure 7 Not shown in the figure, a disk drive for reading and writing a removable non-volatile disk (such as a "floppy disk") and an optical disk drive for reading and writing a removable non-volatile optical disk (such as a compact disc read only memory (CD-ROM), a digital video disc read only memory (DVD-ROM) or other optical media) can be provided. In these cases, each drive can be connected to the bus 18 through one or more data medium interfaces. The memory 28 may include at least one program product, which has a set (such as at least one) of program modules, which are configured to perform the functions of each embodiment of the present application.
[0136] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in the memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. The program modules 42 generally perform the functions and / or methods of the embodiments described herein.
[0137] The electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboards, pointing devices, displays 24, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 12, and / or communicate with any device that enables the electronic device 12 to communicate with one or more other computing devices (e.g., network cards, modems, etc.). Such communication may be performed through an input / output (I / O) interface 22. Furthermore, the electronic device 12 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 20.
[0138] like Figure 7 As shown, the network adapter 20 communicates with other modules of the electronic device 12 via the bus 18. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with the electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0139] The processing unit 16 executes various functional applications and data processing by running the program stored in the memory 28, such as implementing the steps of a reversible steganographic method for hiding image information based on frequency domain mentioned in the above embodiment.
[0140] Based on the same inventive concept, the present application also provides a computer-readable storage medium on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of a reversible steganographic method for hiding image information based on frequency domain provided in the above embodiment are implemented.
[0141] The terms "first", "second", "third", etc. in the specification and claims of the present application and the drawings are used to distinguish different objects rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a series of steps or units are included, or optionally, steps or units not listed are included, or optionally, other steps or units inherent to these processes, methods, products or devices are included.
[0142] Only the part relevant to the present application is shown in the accompanying drawings, but not all of the content. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processing or methods depicted as flow charts. Although the flow chart describes each operation (or step) as a sequential process, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of each operation can be rearranged. When its operation is completed, the process can be terminated, but it can also have additional steps not included in the accompanying drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.
[0143] The terms "component", "module", "system", "unit", etc. used in this specification are used to represent computer-related entities, hardware, firmware, a combination of hardware and software, software, or software in execution. For example, a unit can be, but is not limited to, a process running on a processor, a processor, an object, an executable file, an execution thread, a program, and / or distributed between two or more computers. In addition, these units can be executed from various computer-readable media having various data structures stored thereon. Units can communicate through local and / or remote processes, for example, based on signals having one or more data packets (e.g., data from a second unit interacting with another unit in a local system, a distributed system, and / or a network. For example, the Internet interacts with other systems via signals).
[0144] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples", or "some examples" 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.
[0145] Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Mentioning "embodiment" in this article means that the specific features, structures or characteristics described in conjunction with the embodiment may be included in at least one embodiment of the present embodiment application. The appearance of this phrase in various positions in the specification is not necessarily the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It can be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0146] 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 steganographic method for hiding image information based on frequency domain, characterized in that: include: Obtain a JPEG original image, divide the JPEG original image into blocks and convert the color space from RGB to YCbCr to obtain a brightness component block; The luminance component block is subjected to discrete cosine transformation to convert a discrete signal sequence of a plurality of sampling points into frequency domain coefficients of a plurality of cosine basis functions, wherein the method comprises: obtaining pixel values of an image and a value range of a horizontal frequency of a two-dimensional wave and a vertical frequency of a two-dimensional wave according to the luminance component block, Obtaining a coefficient matrix corresponding to the frequency domain coefficient according to the pixel value, the horizontal frequency of the two-dimensional wave, and the vertical frequency of the two-dimensional wave; Mapping the frequency domain coefficients to a discrete value set, and quantizing the value set according to a preset standard quantization table to obtain an AC component coefficient; Acquire secret information to be embedded, perform matrix coding on the secret information, and compare the regional secret information based on the matrix coding to form a Hamming check matrix; According to the Hamming check matrix, bit-by-bit XOR is performed to determine and modify the corresponding AC component coefficient to obtain the steganographic frequency domain coefficient, which includes: selecting image pixels and channels, judging whether the corresponding frequency domain coefficient is a positive odd number or a negative even number, if so, assigning a positive number to the corresponding bit of the matrix code; if not, assigning a zero to the corresponding bit, Based on the bit-by-bit XOR of the assigned matrix code and the Hamming check matrix, the corresponding AC component coefficient is determined and modified to obtain the steganographic frequency domain coefficient, wherein a binary number is obtained based on the bit-by-bit XOR, and the binary number is converted to obtain the corresponding decimal value, Based on the decimal value, determine the position of the corresponding AC component coefficient and modify the value to write the secret information, wherein if the corresponding AC component coefficient to be modified is a negative number, add 1 to the corresponding value of the coefficient; if the corresponding AC component coefficient to be modified is a positive number, subtract 1 from the corresponding value of the coefficient; if the corresponding value of the modified AC component coefficient is 0, perform XOR again to determine another corresponding AC component coefficient; The steganographic frequency domain coefficients are sequentially subjected to inverse discrete cosine transform, inverse quantization and inverse scrambling processing to obtain a hidden information image.
2. According to claim 1, a reversible steganographic method based on frequency domain image information hiding is characterized in that: The obtaining of the coefficient matrix corresponding to the frequency domain coefficient according to the pixel value, the horizontal frequency of the two-dimensional wave, and the vertical frequency of the two-dimensional wave comprises: The size N of the image block is obtained according to the brightness component block to determine the supplementary coefficient , where the supplementary coefficient for , In the formula, is the horizontal frequency of the two-dimensional wave, The value range is ; According to the supplementary coefficients, the horizontal frequency of the two-dimensional wave and the vertical frequency of the two-dimensional wave, a conversion matrix A is obtained, wherein the conversion matrix A is , In the formula, is the horizontal frequency of the two-dimensional wave, is the vertical frequency of the two-dimensional wave, and The value range is ; According to the conversion matrix A and the pixel value , we get the coefficient matrix F, where .
3. According to claim 1, a reversible steganographic method based on frequency domain image information hiding is characterized in that: The step of mapping the frequency domain coefficients to a discrete value set and quantizing the value set according to a preset standard quantization table to obtain an AC component coefficient includes: Obtaining a quality factor of the JPEG original image, and determining a standard matrix quantization table for frequency domain data quantization according to the quality factor; Based on the quantization table, all elements of the value set are divided correspondingly, and the AC component coefficients are obtained in a quantization order from low frequency to high frequency.
4. A reversible steganographic system based on frequency domain image information hiding, characterized in that: For implementing the method according to any one of claims 1 to 3, the system comprises: The image preprocessing module is configured to obtain a JPEG original image, divide the JPEG original image into blocks, and convert the color space from RGB to YCbCr to obtain a brightness component block; A space-frequency domain conversion process is configured to perform a discrete cosine transform on the luminance component block to convert a discrete signal sequence of a plurality of sampling points into frequency domain coefficients of a plurality of cosine basis functions; A data quantization module is configured to obtain a quality factor of the JPEG original image, determine a standard matrix quantization table for frequency domain data quantization according to the quality factor, divide all elements of the value set based on the quantization table, and obtain an AC component coefficient in a quantization order from low frequency to high frequency; A check matrix production module is configured to perform matrix encoding on the secret information to be embedded according to the acquired secret information, and form a Hamming check matrix by comparing the regional secret information based on the matrix encoding; A data embedding module is configured to perform bit-by-bit XOR according to the Hamming check matrix, determine and modify the corresponding AC component coefficient to obtain a steganographic frequency domain coefficient; The image restoration module is configured to perform inverse discrete cosine transform, inverse quantization and inverse scrambling on the steganographic frequency domain coefficients in sequence to obtain an image of the hidden information.
5. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can perform the steps of the reversible steganography method for hiding image information based on frequency domain according to any one of claims 1-3.
6. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the steps of the reversible steganography method for hiding image information based on frequency domain described in any one of claims 1 to 3 are implemented.
