Image hiding method and system based on local binary pattern
The image hiding method using local binary patterns addresses inefficiencies and vulnerabilities in existing technologies by employing three-dimensional chaotic sequences and RSA encryption, achieving high security and efficiency with effective image restoration.
Patent Information
- Application Number
- CN202411289726.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-14
- Publication Date
- 2024-12-31
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing image protection technologies face challenges of low efficiency and low security, particularly in terms of storage and transmission requirements of measurement matrices, and are vulnerable to known plaintext attacks.
An image hiding method utilizing local binary patterns, which involves generating a three-dimensional chaotic sequence from texture features, constructing a measurement matrix, performing two-dimensional compressed sensing, scrambling and diffusing the image, and embedding it into a carrier image using integer wavelet transforms, enhanced by RSA encryption for key management.
The method significantly enhances security and efficiency, with a PSNR of 45dB, resisting known plaintext attacks and enabling blind extraction of the original image, while improving carrier imperceptibility.
Smart Images

Figure CN119232852A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data security technology, and more specifically, to an image hiding method and system based on a local binary pattern. Background Art
[0002] With the rapid development of computer and intelligent communication technology, digital images are increasingly used in human life. However, the easy accessibility and reproducibility of digital images also bring severe security challenges, involving personal privacy and even national security. Therefore, the security and confidentiality of image information has become a research hotspot for more and more experts and scholars. At present, the methods for protecting image data information mainly include encryption and hiding.
[0003] At present, image encryption mainly uses a series of mathematical transformations, such as scrambling and diffusion, to transform images into ciphertext images in the form of noise or texture. With the advancement of computer technology and cryptanalysis technology, researchers have proposed encryption algorithms that combine compressed sensing, optical technology, quantum theory, DNA coding, deep learning, neural networks, etc. In addition, in order to solve the problem that the features of ciphertext images attract the attention of attackers, the concept of visually meaningful image encryption (VMEI) has been proposed. In terms of image hiding, schemes based on compressed sensing usually include steps such as sparse representation of image matrix, generation of key-controlled measurement matrix, quantization of measurement value matrix, and sparse recovery processing. However, these existing technologies still have the defects of low efficiency and low security, especially the storage and transmission requirements of the measurement matrix bring additional burden to the system. Summary of the invention
[0004] In order to overcome the defects of low efficiency and low security in the existing image protection technology, the present invention proposes the following technical solutions:
[0005] In a first aspect, the present invention provides an image hiding method based on a local binary pattern, comprising:
[0006] Compute the texture feature matrix of the local binary pattern of the plaintext image.
[0007] According to the texture feature matrix, a three-dimensional chaotic sequence is generated.
[0008] The measurement matrix is constructed using three-dimensional chaotic sequence.
[0009] The measurement matrix is used to perform two-dimensional compressed sensing processing on the plaintext image to obtain the measurement value matrix of the compressed plaintext image.
[0010] The measurement value matrix is scrambled and diffused to obtain the ciphertext image.
[0011] The ciphertext image is embedded into the carrier image to obtain the ciphertext carrier image.
[0012] As a preferred technical solution, a three-dimensional chaotic sequence is generated according to a texture feature matrix, including:
[0013] The SHA-256 hash algorithm is used to calculate the hash value h of the texture feature matrix.
[0014] The hash value h is converted into plaintext keys m1, m2, m3, and m4, and the external keys α1, α2, and α3 are obtained.
[0015] The plaintext keys m1, m2, m3 and m4, and the external keys α1, α2 and α3 are encrypted using the RSA algorithm to obtain ciphertext keys c1, c2, c3 and c4, and external ciphertext keys β1, β2 and β3.
[0016] According to the plaintext keys m1, m2, m3 and m4, the external keys α1, α2 and α3, the ciphertext keys c1, c2, c3 and c4, and the external ciphertext keys β1, β2 and β3, the initial values x0, y0, z0 of the three-dimensional chaotic map and the number of pre-iterations T are generated.
[0017] According to the initial values x0, y0, z0 of the three-dimensional chaotic map and the number of pre-iterations T, a three-dimensional chaotic sequence X, Y, Z is generated.
[0018] As a preferred technical solution, the hash value h is converted into plaintext keys m1, m2, m3 and m4, including:
[0019] Split the hash value h into 16 groups of sub-hash values, namely h1, h2, ...h 16 , where each group of sub-hash values contains 4 hexadecimal digits.
[0020] The 16 groups of sub-hash values are converted into plaintext keys m1, m2, m3, and m4 according to the following formula:
[0021]
[0022] Wherein, hex2dec(·) is a conversion function for converting a hexadecimal value to a decimal value.
[0023] As a preferred technical solution, according to the plaintext keys m1, m2, m3 and m4, the external keys α1, α2 and α3, the ciphertext keys c1, c2, c3 and c4, and the external ciphertext keys β1, β2 and β3, the initial values x0, y0, z0 of the three-dimensional chaotic map and the number of pre-iterations T are generated, and the expression is as follows:
[0024]
[0025]
[0026] Among them, mod(·) represents the modulus operation, Indicates rounding down.
[0027] As a preferred technical solution, a three-dimensional chaotic sequence is used to construct a measurement matrix, including:
[0028] The sequence Z is used to transform the plaintext image P into a grayscale image P1, which is expressed as follows:
[0029]
[0030]
[0031] Among them, QZ is the sequence after quantizing the sequence Z, Z min is the minimum value in the sequence Z, Z max is the maximum value in the sequence Z.
[0032] Two compression ratios RT1 and RT2 are set respectively, and a Hamada matrix H of size N×N is constructed.
[0033] Sequence X1 with a length of RT1×N and sequence X2 with a length of RT2×N are respectively extracted from sequences X and Y.
[0034] Sequence X1 and sequence X2 are sorted respectively to obtain index vector RI1 and index vector RI2.
[0035] The Hamada matrix is scrambled using the index vector RI1 and the index vector RI2 to obtain the measurement matrix Ψ1 and the measurement matrix Ψ2, whose expressions are as follows:
[0036]
[0037]
[0038]
[0039] in, represents a Hamada matrix of size 2k×2k, H2 represents a Hamada matrix of size 2×2, sort(X1) represents sorting the sequence X1, sort(X2) represents sorting the sequence X2, H(RI1,:) represents scrambling the Hamada matrix using the index vector RI1, and H(RI2,:) represents scrambling the Hamada matrix using the index vector RI2.
[0040] As a preferred technical solution, a two-dimensional compressed sensing process is performed on the plaintext image using a measurement matrix to obtain a measurement value matrix after the plaintext image is compressed, including:
[0041] The grayscale image P1 is processed by two-dimensional compressed sensing using the measurement matrix Ψ1 and the measurement matrix Ψ2, and the size is The measurement value matrix P2 is expressed as follows:
[0042] P2=Ψ1×P1×Ψ2
[0043] The measurement value matrix P2 is quantized to obtain the quantized measurement value matrix P3, which is expressed as follows:
[0044]
[0045] Among them, min(·) means taking the minimum value, and max(·) means taking the maximum value.
[0046] As a preferred technical solution, the measurement value matrix is scrambled and diffused to obtain a ciphertext image, including:
[0047] A sequence L of length CR×N×N is extracted from the sequence Z, where CR=RT1×RT2.
[0048] The sequence L is sorted to obtain the index vector LI, and then the measurement value matrix P3 is converted into a 1×(CR×N×N) vector PL, and the vector PL is scrambled using the index vector LI, and then reshaped into a matrix P4 of size (RT1×N)×(RT2×N), which is expressed as follows:
[0049]
[0050] Among them, sort(L) means sorting the sequence L and returning the sorted sequence and the corresponding index vector LI, and reshape(·) means the reshaping operation.
[0051] Sequences D1 and D2 of length 500+CR×N×N are respectively extracted from sequence X and sequence Y, and sequence D1 and sequence D2 are added and modulo-calculated to obtain sequence U, whose expression is as follows:
[0052]
[0053] Among them, mod(·) represents the modulus operation, Indicates rounding down.
[0054] The matrix P4 is diffused using sequence U to obtain the ciphertext image S, which is expressed as follows:
[0055]
[0056] Among them, PT1 is a one-dimensional vector obtained after reshaping the matrix P4, and PT2 is a sequence obtained after a series of encryption operations.
[0057] As a preferred technical solution, the ciphertext image is embedded into the carrier image to obtain the ciphertext carrier image, including:
[0058] Get the carrier image.
[0059] Perform integer wavelet transform on the carrier image to obtain the frequency domain coefficient matrix, and embed the ciphertext image into the frequency domain coefficient matrix.
[0060] The frequency domain coefficient matrix of the ciphertext image is inversely transformed by integer wavelet transform to obtain the ciphertext carrier image.
[0061] As a preferred technical solution, integer wavelet transform is performed on the carrier image to obtain a frequency domain coefficient matrix, and the ciphertext image is embedded into the frequency domain coefficient matrix, including:
[0062] Each pixel element of the ciphertext image is converted into an 8-bit binary number, and the 8-bit binary number is divided into four groups, namely the 1st bit, the 2nd-3rd bit, the 4th-5th bit, and the 6th-8th bit.
[0063] Add 2 to each coefficient value in the frequency domain coefficient matrix 9 , and then embed the bit information of the four groups of 8-bit binary numbers into the least significant bits of the coefficient values respectively.
[0064] Use 2 k The correction method corrects the coefficient value and then subtracts 2 9 , and obtain the frequency domain coefficient matrix of the ciphertext image embedded.
[0065] In a second aspect, the present invention further provides an image hiding system based on local binary patterns, which is applied to the image hiding method based on local binary patterns as described in any solution of the first aspect, comprising:
[0066] The calculation module is used to calculate the texture feature matrix of the local binary pattern of the plaintext image.
[0067] The generation module is used to generate a three-dimensional chaotic sequence according to a texture feature matrix.
[0068] The construction module is used to construct a measurement matrix using a three-dimensional chaotic sequence.
[0069] The compression module is used to perform two-dimensional compressed sensing processing on the plaintext image using the measurement matrix to obtain a measurement value matrix after the plaintext image is compressed.
[0070] The scrambling and diffusion module is used to perform scrambling and diffusion operations on the measurement value matrix to obtain a ciphertext image.
[0071] The embedding module is used to embed the ciphertext image into the carrier image to obtain the ciphertext carrier image.
[0072] The beneficial effects of the present invention include at least:
[0073] The present invention firstly generates a three-dimensional chaotic sequence as a random key stream by utilizing the local binary pattern texture features of the plaintext image. The correlation between the key and the plaintext can effectively resist known plaintext attacks. Secondly, a measurement matrix is constructed using the random key stream, and a two-dimensional compressed sensing process is performed on the plaintext image to obtain a measurement value matrix, and then a ciphertext image is generated through scrambling and diffusion operations. Finally, the ciphertext image is embedded into the carrier image, which not only improves the imperceptibility of the carrier, but also achieves a blind extraction effect. The decryption end uses a two-dimensional projected gradient algorithm with embedded decryption to easily restore the original image. At the same time, the PSNR of the present invention is as high as 45dB, and the efficiency is relatively high. While improving the efficiency, the present invention also greatly enhances the security of image protection. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] Figure 1 This is a flow chart of the image hiding method based on local binary patterns provided in Example 1.
[0075] Figure 2 This is a schematic diagram of the principle architecture of the image hiding method based on local binary patterns provided in Example 2.
[0076] Figure 3 This is a schematic diagram of a plaintext image provided in Example 2.
[0077] Figure 4 This is a schematic diagram of the carrier image provided in Example 2.
[0078] Figure 5 This is a schematic diagram of the encrypted carrier image provided in Example 2.
[0079] Figure 6 This is a schematic diagram of the principle architecture for decrypting and reconstructing a secret carrier image provided in Example 2.
[0080] Figure 7 This is a schematic diagram of a plaintext image obtained after decrypting and reconstructing the secret carrier image provided in Example 2.
[0081] Figure 8 This is an architectural diagram of the image hiding system based on local binary patterns provided in Example 3. DETAILED DESCRIPTION
[0082] The following will describe the embodiments of the present invention with reference to the accompanying drawings and preferred technical solutions. Those skilled in the art can easily understand other advantages and effects of the present invention from the contents disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present invention. It should be understood that the preferred technical solutions are only for illustrating the present invention, not for limiting the scope of protection of the present invention.
[0083] It should be noted that the illustrations provided in the following embodiments are only schematic illustrations of the basic concept of the present invention, and thus the drawings only show components related to the present invention rather than being drawn according to the number, shape and size of components in actual implementation. In actual implementation, the type, quantity and proportion of each component may be changed arbitrarily, and the component layout may also be more complicated.
[0084] In the following description, numerous details are discussed to provide a more thorough explanation of the embodiments of the present invention. However, it is obvious to those skilled in the art that the embodiments of the present invention can be implemented without these specific details. In other embodiments, well-known structures and devices are shown in the form of block diagrams rather than in detail to avoid making the embodiments of the present invention difficult to understand.
[0085] Example 1
[0086] This embodiment proposes an image hiding method based on local binary patterns, such as Figure 1 As shown, Figure 1 A schematic flow chart of an image hiding method based on a local binary pattern provided in this embodiment, the method comprises the following steps:
[0087] S1: Calculate the texture feature matrix of the local binary pattern of the plaintext image.
[0088] S2: Generate a three-dimensional chaotic sequence based on the texture feature matrix.
[0089] S3: Construct the measurement matrix using three-dimensional chaotic sequence.
[0090] S4: Perform two-dimensional compressed sensing processing on the plaintext image using the measurement matrix to obtain a measurement value matrix of the compressed plaintext image.
[0091] S5: Perform scrambling and diffusion operations on the measurement value matrix to obtain the ciphertext image.
[0092] S6: Embed the ciphertext image into the carrier image to obtain a ciphertext carrier image.
[0093] It can be understood that by utilizing the local binary pattern texture features of the plaintext image to generate a three-dimensional chaotic sequence as a random key stream, the correlation between this key and the plaintext can effectively resist known plaintext attacks. Secondly, the measurement matrix is constructed using the random key stream, and the plaintext image is subjected to two-dimensional compressed sensing processing to obtain a measurement value matrix, and then the ciphertext image is generated through scrambling and diffusion operations. Finally, the ciphertext image is embedded into the carrier image, which not only improves the imperceptibility of the carrier, but also achieves a blind extraction effect. The decryption end uses a two-dimensional projected gradient algorithm with embedded decryption to easily restore the original image. At the same time, the PSNR of the present invention is as high as 45dB, and the efficiency is relatively high. While improving efficiency, the present invention also greatly enhances the security of image protection.
[0094] Example 2
[0095] like Figure 2 As shown, this embodiment makes improvements on the image hiding method based on local binary pattern proposed in the first embodiment, such as Figure 2 As shown, Figure 2 This is a principle framework diagram of the image hiding method based on local binary patterns provided in this embodiment.
[0096] The size of the input plaintext image P in this embodiment is M×N, such as Figure 3 As shown, and read the carrier image C that is the same size as the plaintext image, such as Figure 4 shown.
[0097] As an exemplary explanation, this embodiment uses Algorithm to extract the texture feature matrix F of the plaintext image P, and its operation is as follows:
[0098] Algorithm 1Feature extraction based on LBP
[0099]
[0100] In this embodiment, a three-dimensional chaotic sequence is generated according to the texture feature matrix, including:
[0101] The SHA-256 hash algorithm is used to calculate the hash value h of the texture feature matrix.
[0102] The hash value h is converted into plaintext keys m1, m2, m3, and m4, and the external keys α1, α2, and α3 are obtained.
[0103] The plaintext keys m1, m2, m3 and m4, and the external keys α1, α2 and α3 are encrypted using the RSA algorithm to obtain ciphertext keys c1, c2, c3 and c4, and external ciphertext keys β1, β2 and β3.
[0104] In this embodiment, the parameters of the RSA algorithm are selected as p=1579, q=1493, private key e=31 and public key d=987319.
[0105] According to the plaintext keys m1, m2, m3 and m4, the external keys α1, α2 and α3, the ciphertext keys c1, c2, c3 and c4, and the external ciphertext keys β1, β2 and β3, the initial values x0, y0, z0 of the three-dimensional chaotic map and the number of pre-iterations T are generated.
[0106] According to the initial values x0, y0, z0 of the three-dimensional chaotic map and the number of pre-iterations T, the three-dimensional chaotic sequence X, Y, Z is generated, and its expression is as follows:
[0107]
[0108] In this embodiment, the parameters of the chaotic mapping 3D-CCLSM are set to r1=3.78, r2=0.0105, r3=0.0126 and r4=3.5.
[0109] In this embodiment, the hash value h is converted into plaintext keys m1, m2, m3 and m4, including:
[0110] Split the hash value h into 16 groups of sub-hash values, namely h1, h2, ...h 16 , where each group of sub-hash values contains 4 hexadecimal digits.
[0111] The 16 groups of sub-hash values are converted into plaintext keys m1, m2, m3, and m4 according to the following formula:
[0112]
[0113] Wherein, hex2dec(·) is a conversion function for converting a hexadecimal value to a decimal value.
[0114] In this embodiment, according to the plaintext keys m1, m2, m3 and m4, the external keys α1, α2 and α3, the ciphertext keys c1, c2, c3 and c4, and the external ciphertext keys β1, β2 and β3, the initial values x0, y0, z0 of the three-dimensional chaotic map and the number of pre-iterations T are generated, and the expressions are as follows:
[0115]
[0116]
[0117] Among them, mod(·) represents the modulus operation, Indicates rounding down.
[0118] As an exemplary description, this embodiment constructs a key conversion model (KAM) and uses Algorithm 2 to obtain the initial values x0, y0, z0 of the three-dimensional chaotic mapping 3D-CCLSM and the number of pre-iterations T to eliminate transient effects. The operation is as follows:
[0119] Algorithm 2Key acquisition model(KAM)
[0120]
[0121]
[0122] In this embodiment, a measurement matrix is constructed using a three-dimensional chaotic sequence, including:
[0123] The sequence Z is used to transform the plaintext image P into a grayscale image P1, which is expressed as follows:
[0124]
[0125]
[0126] Among them, QZ is the sequence after quantizing the sequence Z, Z min is the minimum value in the sequence Z, Z max is the maximum value in the sequence Z.
[0127] Two compression ratios RT1 and RT2 are set respectively, and a Hamadar matrix H of size N×N is constructed. RT1 and RT2 are set to 0.5, and the total compression ratio is CR=RT1×RT2=0.25.
[0128] Sequence X1 with a length of RT1×N and sequence X2 with a length of RT2×N are respectively extracted from sequences X and Y.
[0129] Sequence X1 and sequence X2 are sorted respectively to obtain index vector RI1 and index vector RI2.
[0130] The Hamada matrix is scrambled using the index vector RI1 and the index vector RI2 to obtain the measurement matrix Ψ1 and the measurement matrix Ψ2, whose expressions are as follows:
[0131]
[0132]
[0133]
[0134] in, represents a Hamada matrix of size 2k×2k, H2 represents a Hamada matrix of size 2×2, sort(X1) represents sorting the sequence X1, sort(X2) represents sorting the sequence X2, H(RI1,:) represents scrambling the Hamada matrix using the index vector RI1, and H(RI2,:) represents scrambling the Hamada matrix using the index vector RI2.
[0135] In this embodiment, a two-dimensional compressed sensing process is performed on the plaintext image using a measurement matrix to obtain a measurement value matrix after the plaintext image is compressed, including:
[0136] The grayscale image P1 is processed by two-dimensional compressed sensing using the measurement matrix Ψ1 and the measurement matrix Ψ2, and the size is The measurement value matrix P2 is expressed as follows:
[0137] P2=Ψ1×P1×Ψ2
[0138] The measurement value matrix P2 is quantized to obtain the quantized measurement value matrix P3, which is expressed as follows:
[0139]
[0140] Among them, min(·) means taking the minimum value, and max(·) means taking the maximum value.
[0141] In this embodiment, scrambling and diffusion operations are performed on the measurement value matrix to obtain a ciphertext image, including:
[0142] A sequence L of length CR×N×N is extracted from the sequence Z, where CR=RT1×RT2.
[0143] The sequence L is sorted to obtain the index vector LI, and then the measurement value matrix P3 is converted into a 1×(CR×N×N) vector PL, and the vector PL is scrambled using the index vector LI, and then reshaped into a matrix P4 of size (RT1×N)×(RT2×N), which is expressed as follows:
[0144]
[0145] Among them, sort(L) means sorting the sequence L and returning the sorted sequence and the corresponding index vector LI, and reshape(·) means the reshaping operation.
[0146] Sequences D1 and D2 of length 500+CR×N×N are respectively extracted from sequence X and sequence Y, and sequence D1 and sequence D2 are added and modulo-calculated to obtain sequence U, whose expression is as follows:
[0147]
[0148] Among them, mod(·) represents the modulus operation, Indicates rounding down.
[0149] The matrix P4 is diffused using sequence U to obtain the ciphertext image S, which is expressed as follows:
[0150]
[0151] Among them, PT1 is a one-dimensional vector obtained after reshaping the matrix P4, and PT2 is a sequence obtained after a series of encryption operations.
[0152] In this embodiment, the ciphertext image is embedded into the carrier image to obtain the ciphertext carrier image, including:
[0153] Get the carrier image.
[0154] Perform integer wavelet transform on the carrier image to obtain the frequency domain coefficient matrix, and embed the ciphertext image into the frequency domain coefficient matrix.
[0155] Perform an inverse integer wavelet transform on the frequency domain coefficient matrix of the ciphertext image to obtain the ciphertext carrier image. Figure 5 As shown, Figure 5 This is the encrypted carrier image of this embodiment.
[0156] In this embodiment, integer wavelet transform is performed on the carrier image to obtain a frequency domain coefficient matrix, and the ciphertext image is embedded into the frequency domain coefficient matrix, including:
[0157] Each pixel element of the ciphertext image is converted into an 8-bit binary number, and the 8-bit binary number is divided into four groups, namely the 1st bit, the 2nd-3rd bit, the 4th-5th bit, and the 6th-8th bit.
[0158] Add 2 to each coefficient value in the frequency domain coefficient matrix 9 , and then embed the bit information of the four groups of 8-bit binary numbers into the least significant bits of the coefficient values respectively.
[0159] Use 2 k The correction method corrects the coefficient value and then subtracts 2 9 , and obtain the frequency domain coefficient matrix of the ciphertext image embedded.
[0160] It is understandable that since the subband matrix obtained by integer wavelet transform may have negative numbers, in order to ensure the reversibility and embedding effect of data embedding, each coefficient value is first added with 2. 9 The secret information is then embedded into the least significant bits of the coefficient values and the 2 k Correction method is used to correct, and after embedding, the coefficient value is subtracted by 29 .
[0161] The specific process of obtaining the secret carrier image is shown in Algorithm 3:
[0162] Algorithm 3Embedding algorithm based on 2 k correction and IWT
[0163]
[0164]
[0165] In this embodiment, Figure 6 As shown in Figure 1, the public ciphertext key and the external ciphertext key are sent to the receiver through an asymmetric encryption algorithm to solve the key distribution and management problems. After the receiver receives the encrypted carrier image, it uses the two-dimensional projected gradient algorithm (2DPG-ED) that performs decryption and decompression simultaneously to decrypt and reconstruct the image. The restored plaintext image is shown in Figure 1. Figure 7 shown.
[0166] It can be understood that the present invention proposes an asymmetric visually meaningful image hiding method based on local binary pattern (LBP), which can effectively solve the shortcomings of current image hiding technology. First, the method designs a new three-dimensional chaotic mapping 3D-CCLSM, which utilizes its chaotic behavior and highly sensitive characteristics to initial conditions, combines the plaintext texture information extracted by LBP, and generates a random key stream associated with the plaintext image through SHA-256 hash value calculation and key conversion model. This key stream has an intrinsic connection with the original image and can effectively resist known plaintext attacks. Secondly, the measurement matrix is constructed using the random key stream, and the plaintext image is subjected to two-dimensional compressed sensing processing, and the ciphertext image is generated through scrambling and diffusion operations. Finally, the ciphertext image is hidden in the carrier image by an embedding method based on 2k correction and integer wavelet transform, which not only improves the imperceptibility of the carrier, but also achieves the blind extraction effect. The decryption end can easily restore the original image using a two-dimensional projected gradient algorithm. The simulation results show that the image hiding algorithm of the present invention has a high comprehensive efficiency, and the PSNR reaches 45dB.
[0167] In order to further enhance the security of image hiding, the present invention adopts the public key cryptographic algorithm RSA to transmit the key, avoiding the additional key transmission and effectively solving the problem of key distribution and management. This asymmetric encryption method not only improves the security of the overall solution, but also provides a valuable reference for the future development of the field of image hiding.
[0168] Example 3
[0169] like Figure 8 As shown, this embodiment proposes an image hiding system based on local binary patterns, which is applied to the image hiding method based on local binary patterns as described in the above embodiments, and includes: a calculation module 100, a generation module 200, a construction module 300, a compression module 400, a scrambling and diffusion module 500 and an embedding module 600.
[0170] Among them, the calculation module 100 is used to calculate the texture feature matrix of the local binary pattern of the plaintext image. The generation module 200 is used to generate a three-dimensional chaotic sequence based on the texture feature matrix. The construction module 300 is used to construct a measurement matrix using the three-dimensional chaotic sequence. The compression module 400 is used to perform two-dimensional compressed sensing processing on the plaintext image using the measurement matrix to obtain a measurement value matrix after the plaintext image is compressed. The scrambling and diffusion module 500 is used to perform scrambling and diffusion operations on the measurement value matrix to obtain a ciphertext image. The embedding module 600 is used to embed the ciphertext image into the carrier image to obtain a ciphertext carrier image.
[0171] It should be noted that the aforementioned explanation of the embodiment of the image hiding method based on local binary patterns is also applicable to the image hiding system based on local binary patterns of this embodiment, and will not be repeated here.
[0172] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms are not necessarily directed to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or N embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0173] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "N" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0174] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.
[0175] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiment, the N steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array, a field programmable gate array, etc.
[0176] A person skilled in the art may understand that all or part of the steps in the above-mentioned embodiment method may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0177] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention. For those skilled in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to list all the embodiments here. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the claims of the present invention.
Claims
1. An image hiding method based on local binary pattern, characterized in that: include: Calculate the texture feature matrix of the local binary pattern of the plaintext image; Generate a three-dimensional chaotic sequence based on the texture feature matrix; The measurement matrix is constructed using three-dimensional chaotic sequence; The plaintext image is processed with two-dimensional compressed sensing using the measurement matrix to obtain the measurement value matrix after the plaintext image is compressed; Perform scrambling and diffusion operations on the measurement value matrix to obtain the ciphertext image; The ciphertext image is embedded into the carrier image to obtain the ciphertext carrier image.
2. The image hiding method based on local binary pattern according to claim 1, characterized in that: According to the texture feature matrix, a three-dimensional chaotic sequence is generated, including: Calculate the hash value h of the texture feature matrix using the SHA-256 hash algorithm; Convert the hash value h into plaintext keys m1, m2, m3 and m4, and obtain external keys α1, α2 and α3; Use the RSA algorithm to encrypt the plaintext keys m1, m2, m3 and m4, and the external keys α1, α2 and α3 respectively, to obtain the ciphertext keys c1, c2, c3 and c4, and the external ciphertext keys β1, β2 and β3; Generate initial values x0, y0, z0 of the three-dimensional chaotic map and the number of pre-iterations T according to plaintext keys m1, m2, m3 and m4, external keys α1, α2 and α3, ciphertext keys c1, c2, c3 and c4, and external ciphertext keys β1, β2 and β3; According to the initial values x0, y0, z0 of the three-dimensional chaotic map and the number of pre-iterations T, a three-dimensional chaotic sequence X, Y, Z is generated.
3. The image hiding method based on local binary pattern according to claim 2, characterized in that: Convert the hash value h to plaintext keys m1, m2, m3, and m4, including: Split the hash value h into 16 groups of sub-hash values, namely h1, h2, ...h 16 , where each group of sub-hash values contains 4 hexadecimal digits; The 16 groups of sub-hash values are converted into plaintext keys m1, m2, m3, and m4 according to the following formula: Wherein, hex2dec(·) is a conversion function for converting a hexadecimal value to a decimal value.
4. The image hiding method based on local binary pattern according to claim 3, characterized in that: According to the plaintext keys m1, m2, m3 and m4, the external keys α1, α2 and α3, the ciphertext keys c1, c2, c3 and c4, and the external ciphertext keys β1, β2 and β3, the initial values x0, y0, z0 of the three-dimensional chaotic map and the number of pre-iterations T are generated, and the expressions are as follows: Among them, mod(·) represents the modulus operation, Indicates rounding down.
5. The image hiding method based on local binary pattern according to claim 2, characterized in that: The measurement matrix is constructed using a three-dimensional chaotic sequence, including: The sequence Z is used to transform the plaintext image P into a grayscale image P1, which is expressed as follows: Among them, QZ is the sequence after quantizing the sequence Z, Z min is the minimum value in the sequence Z, Z max is the maximum value in sequence Z; Set two compression ratios RT1 and RT2 respectively, and construct a Hamada matrix H of size N×N; Sequence X1 with a length of RT1×N and sequence X2 with a length of RT2×N are extracted from sequences X and Y respectively; Sort the sequence X1 and the sequence X2 respectively to obtain the index vector RI1 and the index vector RI2; The Hamada matrix is scrambled using the index vector RI1 and the index vector RI2 to obtain the measurement matrix Ψ1 and the measurement matrix Ψ2, whose expressions are as follows: Among them, H 2k Indicates size is 2 k ×2 k H2 represents a Hamada matrix of size 2×2, sort(X1) represents sorting the sequence X1, sort(X2) represents sorting the sequence X2, H(RI1,:) represents scrambling the Hamada matrix using the index vector RI1, and H(RI2,:) represents scrambling the Hamada matrix using the index vector RI2.
6. The image hiding method based on local binary pattern according to claim 5, characterized in that: The plaintext image is processed with two-dimensional compressed sensing using the measurement matrix to obtain the measurement value matrix after the plaintext image is compressed, including: The grayscale image P1 is processed by two-dimensional compressed sensing using the measurement matrix Ψ1 and the measurement matrix Ψ2, and the size is The measurement value matrix P2 is expressed as follows: P2=Ψ1×P1×Ψ2 The measurement value matrix P2 is quantized to obtain the quantized measurement value matrix P3, which is expressed as follows: Among them, min(·) means taking the minimum value, and max(·) means taking the maximum value.
7. The image hiding method based on local binary pattern according to claim 6, characterized in that: The measurement value matrix is scrambled and diffused to obtain the ciphertext image, including: Extract a sequence L of length CR×N×N from sequence Z, where CR=RT1×RT2; The sequence L is sorted to obtain the index vector LI, and then the measurement value matrix P3 is converted into a 1×(CR×N×N) vector PL, and the vector PL is scrambled using the index vector LI, and then reshaped into a matrix P4 of size (RT1×N)×(RT2×N), which is expressed as follows: Among them, sort(L) means sorting the sequence L and returning the sorted sequence and the corresponding index vector LI, and reshape(·) means reshaping operation; Sequences D1 and D2 of length 500+CR×N×N are respectively extracted from sequence X and sequence Y, and sequence D1 and sequence D2 are added and modulo-calculated to obtain sequence U, whose expression is as follows: Among them, mod(·) represents the modulus operation, Indicates rounding down; The matrix P4 is diffused using sequence U to obtain the ciphertext image S, which is expressed as follows: Among them, PT1 is a one-dimensional vector obtained after reshaping the matrix P4, and PT2 is a sequence obtained after a series of encryption operations.
8. The image hiding method based on local binary pattern according to claim 1, characterized in that: Embed the ciphertext image into the carrier image to obtain the ciphertext carrier image, including: Obtaining a carrier image; Perform integer wavelet transform on the carrier image to obtain the frequency domain coefficient matrix, and embed the ciphertext image into the frequency domain coefficient matrix; The frequency domain coefficient matrix of the ciphertext image is inversely transformed by integer wavelet transform to obtain the ciphertext carrier image.
9. The image hiding method based on local binary pattern according to claim 8, characterized in that: Perform integer wavelet transform on the carrier image to obtain the frequency domain coefficient matrix, and embed the ciphertext image into the frequency domain coefficient matrix, including: Convert each pixel element of the ciphertext image into an 8-bit binary number, and divide the 8-bit binary number into four groups, namely the 1st bit, the 2nd-3rd bit, the 4th-5th bit, and the 6th-8th bit; Add 2 to each coefficient value in the frequency domain coefficient matrix 9 , and then embed the bit information of the four groups of 8-bit binary numbers into the least significant bits of the coefficient values respectively; Use 2 k The correction method corrects the coefficient value and then subtracts 2 9 , and obtain the frequency domain coefficient matrix of the ciphertext image embedded.
10. An image hiding system based on local binary patterns, characterized in that: include: A calculation module, used for calculating a texture feature matrix of a local binary pattern of a plaintext image; A generation module, used for generating a three-dimensional chaotic sequence according to a texture feature matrix; A construction module, used for constructing a measurement matrix using a three-dimensional chaotic sequence; A compression module is used to perform two-dimensional compressed sensing processing on the plaintext image using the measurement matrix to obtain a measurement value matrix after the plaintext image is compressed; The scrambling and diffusion module is used to perform scrambling and diffusion operations on the measurement value matrix to obtain a ciphertext image; The embedding module is used to embed the ciphertext image into the carrier image to obtain the ciphertext carrier image.
Citation Information
Cited By
Image grading security privacy protection method
CN120692366A