Image processing method and apparatus

By combining frequency domain processing and multiple affine transformations with depth feature extraction, the problem of hiding and restoring secret images in complex textured carrier images is solved, achieving high-security and high-accuracy image steganography and restoration.

CN116402668BActive Publication Date: 2026-07-03SOUTH CHINA NORMAL UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SOUTH CHINA NORMAL UNIV
Filing Date
2023-04-06
Publication Date
2026-07-03

AI Technical Summary

Technical Problem

Existing image steganography techniques struggle to effectively conceal secret images in complex carrier images when facing steganalysis techniques developed through deep learning, and the secret images are difficult to fully recover during restoration, resulting in low security.

Method used

By converting the carrier image and the secret image to the frequency domain, stitching them together, and performing multiple affine transformations, combined with depth feature extraction and affine transformations, a secret image is generated. Furthermore, the ability to resist steganalysis and the accuracy of secret image recovery are improved through parameter optimization during training.

Benefits of technology

It improves the anti-steganography capability of the encrypted image, ensures the quality of the carrier image, enhances the concealment of the secret image and the accuracy of its recovery, and has strong robustness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116402668B_ABST
    Figure CN116402668B_ABST
Patent Text Reader

Abstract

This invention relates to an image processing method, including image hiding steps: acquiring a carrier image and converting the carrier image to the frequency domain to obtain a carrier frequency image; acquiring a secret image and converting the secret image to the frequency domain to obtain a secret frequency image; concatenating the carrier frequency image and the secret frequency image to obtain a first concatenated image; performing n consecutive affine transformations on the first concatenated image, corresponding to each affine transformation to obtain n first affine transformed images; concatenating the n first affine transformed images and performing an affine transformation to obtain a second affine transformed image; performing channel compression on the second affine transformed image to obtain a first compressed image; and performing spatial domain transformation on the portion of the first compressed image corresponding to the carrier frequency image to obtain the hidden image. Compared with existing technologies, this method can effectively resist steganalysis and has high security.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and in particular to an image processing method and apparatus. Background Technology

[0002] In the internet age, a vast amount of digital images, text, audio, video, and other multimedia information is widely disseminated. However, when private information is transmitted on this transparent platform, it faces the risk of being stolen and tampered with by criminals. To achieve covert communication of confidential information, steganography techniques can be used to embed secret information into multimedia carriers that are not easily suspected, such as images.

[0003] Image steganography includes secret image hiding and secret image recovery. Secret image hiding refers to the process of embedding a secret image that needs to be kept secret into a carrier image to generate a secret image that hides the secret image. Secret image recovery refers to the process of recovering the secret image hidden in the secret image from the secret image.

[0004] However, corresponding image steganography techniques have given rise to steganalysis techniques. Steganalysis can identify secret information carried in coded images, posing a challenge to the security of image steganography. Although traditional image steganography methods can guarantee information security to a certain extent, with the development of deep learning, steganalysis techniques are gradually moving towards higher-dimensional features and more complex algorithms. Steganalysis has improved its recognition rate for coded images, especially for coded images generated from carrier images with complex textures. Therefore, traditional image steganography methods are difficult to effectively resist steganalysis and have low security. Summary of the Invention

[0005] The purpose of this invention is to overcome the shortcomings and deficiencies of the prior art and provide an image processing method that can effectively resist steganalysis and has high security.

[0006] This invention is achieved through the following technical solution: an image processing method, including an image hiding step:

[0007] A carrier image is acquired and converted to the frequency domain to obtain a carrier frequency image;

[0008] Obtain the secret image and convert it to the frequency domain to obtain the secret frequency image;

[0009] The carrier frequency image and the secret frequency image are stitched together to obtain a first stitched image;

[0010] Perform n consecutive affine transformations on the first stitched image, and obtain n first affine transformation images for each affine transformation.

[0011] The n first affine transformation images are stitched together and then subjected to affine transformation to obtain the second affine transformation image;

[0012] The second affine transformed image is subjected to channel compression to obtain the first compressed image;

[0013] Spatial domain transformation is performed on the portion of the carrier frequency image in the first compressed image to obtain the carrier-compressed image.

[0014] Further, after stitching the carrier frequency image and the secret frequency image to obtain the first stitched image, the method further includes the following steps:

[0015] Depth features are extracted from the first stitched image to obtain depth image features;

[0016] The depth image features and n first affine transformation images are concatenated and then subjected to affine transformation to obtain the second affine transformation image.

[0017] Compared to existing technologies, this invention connects the transformation results of multiple affine transformations using dense connections, thus preserving more image features of the complex textured carrier image and the secret image. This ensures the quality of the carrier image, enabling it to better conceal the secret image, thereby improving the carrier image's resistance to steganalysis and enhancing its security. Simultaneously, the image features of the secret image are preserved to a greater extent, improving the accuracy of secret image recovery.

[0018] Furthermore, it is characterized by including an image restoration step:

[0019] The encrypted image is acquired and converted to the frequency domain to obtain an encrypted frequency image;

[0020] Obtain auxiliary variables and convert them to the frequency domain to obtain auxiliary frequency variables;

[0021] All the carrier frequency images and the auxiliary frequency variables are stitched together to obtain a second stitched image;

[0022] After copying the channels of the second stitched image, an inverse affine transformation is performed to obtain the first inverse affine transformation image;

[0023] The first inverse affine transformation image is compressed to obtain a second compressed image;

[0024] Perform n consecutive inverse affine transformations on the second compressed image to obtain the second inverse affine transformed image;

[0025] The secret image is obtained by performing a spatial domain transformation on the part corresponding to the auxiliary variable in the second inverse affine transformation image.

[0026] Furthermore, the trainable parameters of the affine transformation are trained through the following steps:

[0027] The low-frequency loss is obtained by calculating the loss between the low-frequency carrier frequency image of the carrier image sample and the low-frequency carrier density frequency image of the corresponding generated carrier density image.

[0028] The trainable parameters are adjusted using the low-frequency loss.

[0029] Furthermore, the trainable parameters in the affine transformation and the inverse affine transformation are trained through the following steps:

[0030] The hidden loss is obtained by calculating the loss between the carrier image sample and the corresponding generated carrier image.

[0031] The loss between the secret image sample and the corresponding recovered secret image is calculated to obtain the recovery loss;

[0032] Calculate the loss between the low-frequency carrier frequency image of the carrier image sample and the low-frequency carrier frequency image of the corresponding generated carrier density image;

[0033] The total loss is obtained by multiplying the hidden loss, the recovery loss, and the low-frequency loss by different loss coefficients and then summing them.

[0034] The trainable parameters in the affine transformation, the inverse affine transformation, and the deep feature extraction are adjusted using the total loss until the total loss converges.

[0035] Based on the same inventive concept, the present invention also provides an image processing apparatus, including a steganography unit, wherein the steganography unit includes:

[0036] The carrier image conversion module is used to acquire the carrier image and convert the carrier image to the frequency domain to obtain a carrier frequency image;

[0037] A secret image conversion module is used to acquire the secret image and convert the secret image to the frequency domain to obtain a secret frequency image;

[0038] The first stitching module is used to stitch the carrier frequency image and the secret frequency image together to obtain a first stitched image;

[0039] The first affine transformation module is used to perform n consecutive affine transformations on the first stitched image, and each affine transformation yields n first affine transformation images.

[0040] The second affine transformation module is used to stitch together n first affine transformation images and then perform an affine transformation to obtain a second affine transformation image.

[0041] The first compression module is used to perform channel compression on the second affine transformation image to obtain a first compressed image;

[0042] The first spatial domain conversion module is used to perform spatial domain conversion on the portion of the carrier frequency image in the first compressed image to obtain a compressed image.

[0043] Furthermore, the steganography unit also includes:

[0044] The depth feature extraction module is used to extract depth features from the first stitched image to obtain depth image features;

[0045] The second affine transformation module is replaced by a module that concatenates the depth image features and n first affine transformation images and then performs an affine transformation to obtain a second affine transformation image.

[0046] Furthermore, it also includes a recovery unit, the recovery unit comprising:

[0047] The encrypted image conversion module is used to acquire the encrypted image and convert the encrypted image to the frequency domain to obtain an encrypted frequency image;

[0048] The auxiliary variable conversion module is used to acquire auxiliary variables and convert the auxiliary variables to the frequency domain to obtain auxiliary frequency variables;

[0049] The second stitching module is used to stitch together all the carrier frequency images and the auxiliary frequency variables to obtain a second stitched image;

[0050] The first inverse affine transformation module is used to perform inverse affine transformation on the second stitched image after channel copying to obtain the first inverse affine transformation image.

[0051] The second compression module is used to perform channel compression on the first inverse affine transformation image to obtain a second compressed image.

[0052] The second inverse affine transformation module is used to perform n consecutive inverse affine transformations on the second compressed image to obtain the second inverse affine transformation image.

[0053] The second spatial domain transformation module is used to transform the spatial domain of the part corresponding to the auxiliary variable in the second inverse affine transformation image to obtain the secret image.

[0054] Furthermore, the trainable parameters in the first affine transformation module and the second affine transformation module are trained through the following steps:

[0055] The low-frequency loss is obtained by calculating the loss between the low-frequency carrier frequency image of the carrier image sample and the low-frequency carrier density frequency image of the corresponding generated carrier density image.

[0056] The trainable parameters are adjusted using the low-frequency loss.

[0057] Furthermore, the trainable parameters in the first affine transformation module, the second affine transformation module, the first inverse affine transformation module, and the second inverse affine transformation module are trained through the following steps:

[0058] The hidden loss is obtained by calculating the loss between the carrier image sample and the corresponding generated carrier image.

[0059] The loss between the secret image sample and the corresponding recovered secret image is calculated to obtain the recovery loss;

[0060] Calculate the loss between the low-frequency carrier frequency image of the carrier image sample and the low-frequency carrier frequency image of the corresponding generated carrier density image;

[0061] The total loss is obtained by multiplying the hidden loss, the recovery loss, and the low-frequency loss by different loss coefficients and then summing them.

[0062] The trainable parameters in the first affine transformation module, the second affine transformation module, the first inverse affine transformation module, the second inverse affine transformation module, and the deep feature extraction module are adjusted using the total loss until the total loss converges.

[0063] To better understand and implement this invention, the following detailed description is provided in conjunction with the accompanying drawings. Attached Figure Description

[0064] Figure 1 This is a schematic diagram illustrating an application environment of an image processing method according to an exemplary embodiment;

[0065] Figure 2 This is a flowchart illustrating the image steganography steps in the image processing method of Example 1;

[0066] Figure 3 This is a schematic diagram of the structure of the steganography unit 10 of the image processing apparatus in Embodiment 1;

[0067] Figure 4 This is a flowchart illustrating the image steganography steps in the image processing method of Example 2;

[0068] Figure 5 This is a schematic diagram of the steganography unit 10 of the image processing apparatus in Embodiment 2;

[0069] Figure 6 This is a flowchart illustrating the image restoration step in an image processing method.

[0070] Figure 7This is a schematic diagram of the image restoration unit 20 of the image processing device.

[0071] Figure 8 This is a flowchart illustrating the training method based on image processing techniques.

[0072] Figure 9 This is a schematic diagram of the structure of a training device based on an image processing apparatus. Detailed Implementation

[0073] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0074] This invention addresses the problem of weak anti-steganography capabilities in existing image steganography processing methods for carrier images with complex textures. It argues that when embedding a secret image into a carrier image, it is necessary to generate a steganography image based on the image features of the carrier image. However, carrier images with complex textures have a large number of image features, which leads to the loss of some features during the hiding process. After the loss of features, the image quality of the carrier image deteriorates, and a poor-quality image cannot completely hide the secret image, making the steganography image easily detectable by steganography analysis. In some cases, artifacts and color distortion may even appear on the steganography image.

[0075] Furthermore, for secret images with complex textures, some features are lost during the hiding process, making it difficult to fully recover the secret image during image restoration.

[0076] To address the problems identified in the aforementioned research, this invention proposes an image processing method capable of preserving the image features of both the carrier image and the secret image. This method includes an image steganography step and an image restoration step. The image steganography step involves hiding the secret image within the carrier image to generate a steganography image; the image restoration step involves recovering the secret image from the steganography image. Furthermore, based on this image processing method, an optimization training method is proposed for the trainable parameters involved in the image steganography and image restoration steps. This will be explained in detail in the following three parts.

[0077] Please see Figure 1This is a schematic diagram illustrating an application environment of an image processing method according to an exemplary embodiment. It includes a data transmitter A and a data receiver B. Data transmitter A and data receiver B can be computers, mobile phones, tablets, PDAs (Personal Digital Assistants), e-book readers, multimedia players, etc., and can also be dedicated servers. Data transmitter A and data receiver B can transmit data to each other via interconnection through wireless LAN, public networks, or other network methods. Data transmitter A uses the image processing method of this invention to hide a secret image within a carrier image, obtaining the secret image, and then transmits the secret image to data receiver B. Upon receiving the secret image, data receiver B uses the image processing method of this invention to recover the secret image from the secret image.

[0078] (a) Image Steganography

[0079] Example 1

[0080] Please also refer to Figure 2 and Figure 3 ,in Figure 2 This is a flowchart illustrating the image steganography steps in the image processing method of Example 1; Figure 3 This is a schematic diagram of the steganalysis unit 10 of the image processing apparatus in Embodiment 1. The steganalysis unit 10 of this image steganalysis apparatus performs the following image steganalysis steps: acquiring a carrier image and a secret image, and hiding the secret image within the carrier image to obtain the carrier image. Specifically, the steganalysis unit 10 includes a carrier image conversion module 11a, a secret image conversion module 11b, a first stitching module 12, a first affine transformation module 13, a second affine transformation module 14, a first compression module 15, and a first spatial domain conversion module 16.

[0081] The carrier image conversion module 11a is used to perform step S11a: acquire a carrier image and convert the carrier image to the frequency domain to obtain multiple carrier frequency images of different frequencies.

[0082] The carrier image is spatial domain data. To facilitate subsequent data processing, the carrier image is converted to the frequency domain, resulting in its spectrum, or carrier frequency image. Based on different frequencies, the carrier frequency image can be divided into multiple carrier frequency images of different frequencies. Obtaining multiple carrier frequency images of different frequencies allows for the concealment of secret images within the high-frequency components of the carrier image, thereby improving the stealth of the secret images.

[0083] In practical implementation, spatial domain-to-frequency domain conversion methods such as Haar discrete wavelet transform and dual-tree complex wavelet transform can be used to convert the carrier image to the frequency domain. For example, using Haar discrete wavelet transform to convert the carrier image to the frequency domain yields four carrier frequency images of different frequencies: a low-frequency carrier frequency image LL, a first high-frequency carrier frequency image LH, a second high-frequency carrier frequency image HL, and a third high-frequency carrier frequency image HH. For a carrier image with dimensions (B, C, W, H), the dimensions of the carrier frequency image obtained after Haar discrete wavelet transform will be (B, C, W / 2, H / 2), where B represents the batch size, C represents the number of channels, W represents the image width, and H represents the image height.

[0084] The secret image conversion module 11b is used to perform step S11b: acquire a secret image and convert the secret image to the frequency domain to obtain multiple secret frequency images of different frequencies.

[0085] A secret image is a type of data in the spatial domain. Transforming a secret image into the frequency domain yields its spectrum, also known as a secret frequency image. Based on different frequencies, secret frequency images can be categorized into multiple secret frequency images of different frequencies.

[0086] In practical implementation, spatial domain-frequency domain conversion methods such as Haar discrete wavelet transform and dual-tree complex wavelet transform can be used to convert the secret image to the frequency domain.

[0087] The first stitching module 12 is used to perform step S12: stitching all carrier frequency images with secret frequency images to obtain the first stitched image.

[0088] In this process, the carrier frequency image and the secret frequency image are stitched together along the channel direction. The number of channels in the first stitched image is the sum of the number of channels in all the carrier frequency images and the secret frequency images. For example, if four carrier frequency images with dimensions (B, C, W / 2, H / 2) and four secret frequency images with the same dimensions (B, C, W / 2, H / 2) are stitched together along the channel direction, the dimensions of the first stitched image will be (B, 8C, W / 2, H / 2).

[0089] The first affine transformation module 13 is used to execute step S13: perform n consecutive affine transformations on the first stitched image, and obtain n first affine transformation images corresponding to each affine transformation.

[0090] The transformation expression for the k-th affine transformation is:

[0091]

[0092]

[0093] in, This is the portion of the carrier image corresponding to the kth first affine transformation image; α is the part of the secret image corresponding to the kth first affine transformation image; α is the sigmoid function; ⊙ represents the Hada code product; δ(·), φ(·), ρ(·) and θ(·) are arbitrary functions.

[0094] The second affine transformation module 14 is used to perform step S14: stitch together n first affine transformation images and then perform affine transformation to obtain a second affine transformation image.

[0095] Specifically, n first affine transformation images are stitched together on the channel side to obtain a stitched image with dimensions (B, n*C, W / 2, H / 2). An affine transformation is then performed on this stitched image to obtain a second affine transformation image with the same dimensions (B, n*C, W / 2, H / 2).

[0096] The first compression module 15 is used to perform step S15: channel compression on the second affine transformation image to obtain the first compressed image.

[0097] Specifically, the second affine transformation image is compressed to the same dimension as the first stitched image in the channel direction so that a carrier image with the same dimension as the carrier image can be obtained after subsequent transformations in the spatial domain, so that the carrier image and the carrier image are visually identical.

[0098] The first spatial domain conversion module 16 is used to perform step S16: convert the part corresponding to the carrier frequency image in the first compressed image into the spatial domain to obtain the carrier compressed image.

[0099] Specifically, based on the stitching order of the carrier frequency image and the secret frequency image in the first stitched image, the portion corresponding to the carrier frequency image can be segmented from the first compressed image. Performing a spatial domain transformation on this segmented image data yields the secret-carrying image. The portion of the first compressed image corresponding to the secret frequency image contains no valid information and can be discarded. In a specific implementation, the first compressed image can be transformed to the spatial domain using an inverse Haar discrete wavelet transform to obtain the secret-carrying image.

[0100] Example 2

[0101] Please also refer to Figure 4 and Figure 5 ,in Figure 4 This is a flowchart illustrating the image steganography steps in the image processing method of Example 2; Figure 5 This is a schematic diagram of the steganalysis unit 10 of the image processing apparatus of Embodiment 2. The image processing apparatus of Embodiment 2 differs from the image processing apparatus of Embodiment 1 in only the following two aspects:

[0102] 1. The image steganography unit 10 in Embodiment 2 further includes a depth feature extraction module 17;

[0103] 2. The input data of the second affine transformation module 14' in Embodiment 2 is different from that of the second affine transformation module 14 in Embodiment 1.

[0104] Specifically, the depth feature extraction module 17 is used to perform step S17: extracting depth features from the first stitched image to obtain depth image features.

[0105] The deep feature extraction process utilizes a deep neural network model to extract abstract, depth-related features from the first stitched image, known as deep image features. These deep image features contain crucial details about both the secret image and the carrier image. By adding these deep image features to the secret image and carrier image within the carrier image, more accurate reconstruction based on these key details is possible during the restoration of the secret image and carrier image. Even if the secret image is compromised, the secret image and carrier image can still be accurately reconstructed using the deep image features.

[0106] Furthermore, depth features can be extracted from the first stitched image using an encoder-decoder network model in a deep neural network. The encoder-decoder network model includes an encoder and a decoder. The encoder encodes the first stitched image to extract a depth feature vector; the decoder decodes the depth feature vector output by the encoder, converting it into depth image features in the target form.

[0107] In practical implementation, the encoder-decoder network model can be the U-net model. The encoder in the U-net model includes several downsampling convolutional layers and several pooling layers, while the decoder includes several upsampling convolutional layers and several stitching layers. The features extracted by each convolutional layer in the encoder are concatenated with the features output by the corresponding convolutional layer in the decoder, and then jointly fed into the next convolutional layer of the decoder for upsampling. Thus, the U-net model can extract more fine-grained depth image features. To ensure that the size of the depth image features is consistent with the size of the first stitched image, the kernel size of the convolutional layers in the U-net model is set to 3×3, the padding is set to 1, and the activation function is set to LeakyReLu.

[0108] The second affine transformation module 14' is used to execute step S14': after concatenating the depth image features and n first affine transformation images, perform an affine transformation to obtain the second affine transformation image.

[0109] Specifically, the depth image features and n first affine transformation images are stitched together in the channel direction to obtain a second affine transformation image carrying the depth image features.

[0110] (II) Image Restoration Section

[0111] Please also refer to Figure 6 and Figure 7 ,in, Figure 6 This is a flowchart illustrating the image restoration step in an image processing method. Figure 7 This is a schematic diagram of the image restoration unit 20 of an image processing device. The image restoration unit 20 performs the following image restoration steps: acquiring a secret image and recovering the secret image from the secret image. Specifically, the image restoration unit 20 includes a secret image conversion module 21a, an auxiliary variable conversion module 21b, a second stitching module 22, a first inverse affine transformation module 23, a second compression module 24, a second inverse affine transformation module 25, and a second spatial domain conversion module 26.

[0112] The encrypted image conversion module 21a is used to perform step S21a: acquire the encrypted image and convert the encrypted image to the frequency domain to obtain multiple encrypted frequency images of different frequencies.

[0113] Among them, a encrypted image is a type of data in the spatial domain. To facilitate subsequent data processing, the encrypted image is converted to the frequency domain to obtain its spectrum, i.e., the encrypted frequency image. Based on different frequencies, the encrypted frequency image can be divided into multiple encrypted frequency images of different frequencies.

[0114] The auxiliary variable conversion module 21b is used to execute step S21b: obtain auxiliary variables and convert the auxiliary variables to the frequency domain to obtain multiple auxiliary frequency variables of different frequencies.

[0115] In this context, auxiliary frequency variables serve as containers for the secret image to be recovered. These auxiliary variables can be constants or matrix variables sampled from a standard normal distribution, with dimensions identical to the secret image to be recovered. Transforming the auxiliary variables into the frequency domain yields their spectrograms, i.e., the auxiliary frequency variables. Depending on the frequency, auxiliary frequency variables can be categorized into multiple auxiliary frequency variables of different frequencies.

[0116] The second stitching module 22 is used to perform step S22: stitching together all carrier frequency images and auxiliary frequency variables to obtain the second stitched image.

[0117] In this process, all the encrypted frequency images and auxiliary frequency variables are stitched together in the channel direction to obtain a second stitched image whose number of channels is the sum of the number of channels of all the encrypted frequency images and auxiliary frequency variables.

[0118] The first inverse affine transformation module 23 is used to execute step S23: after copying the channels of the second stitched image, perform an inverse affine transformation to obtain the first inverse affine transformation image.

[0119] Specifically, the second stitched image is channel-copied to make its number of channels the same as the second affine image, i.e., its dimensions are (B, n*C, W / 2, H / 2). Then, an inverse affine transformation is performed on the channel-copied second stitched image to obtain a first inverse affine transformed image with the same dimensions as the second affine image.

[0120] The second compression module 24 is used to perform step S24: channel compression on the first inverse affine transformation image to obtain the second compressed image.

[0121] Specifically, the first inverse affine transformation image is compressed to make the number of channels of the first inverse affine transformation image the same as that of the first stitched image.

[0122] The second inverse affine transformation module 25 is used to execute step 25: perform n consecutive inverse affine transformations on the second compressed image to obtain the second inverse affine transformation image.

[0123] The transformation expression for the k-th inverse affine transformation is:

[0124]

[0125]

[0126] in, This refers to the part of the auxiliary variable in the k-th second inverse affine transformation image; α is the part of the corresponding ciphertext image in the k-th second inverse affine transformation image; α is the sigmoid function; ⊙ represents the Hada code product; δ(·), φ(·), ρ(·) and θ(·) are arbitrary functions.

[0127] The second spatial domain transformation module 26 is used to perform step S26: perform spatial domain transformation on the part corresponding to the auxiliary variable in the second inverse affine transformation image to obtain the secret image.

[0128] In this second inverse affine transformation image, the portion corresponding to the auxiliary variables is the secret image in the frequency domain, and the portion corresponding to the secret-carrying image is the carrier image in the frequency domain. Based on the stitching order of the secret-carrying frequency image and the auxiliary frequency variables in the second stitched image, the secret image and the carrier image in the frequency domain can be segmented from the second inverse affine transformation image. A spatial domain transformation of the secret image in the frequency domain can restore the secret image; a spatial domain transformation of the carrier image in the frequency domain can restore the carrier image. Specifically, the spatial domain transformation of the secret image in the frequency domain can be performed using the inverse Haar discrete wavelet transform, and the spatial domain transformation of the carrier image in the frequency domain can also be performed using the inverse Haar discrete wavelet transform.

[0129] (III) Training Section

[0130] Please see Figure 8 and Figure 9 , Figure 8 This is a flowchart illustrating the training method based on the aforementioned image processing method. Figure 9 This is a schematic diagram of the training device based on the aforementioned image processing apparatus. This training device is used to optimize the trainable parameters in the first affine transformation module 13, the second affine transformation module 14, the first inverse affine transformation module 23, the second inverse affine transformation module 25, and the depth feature extraction module 17 within the image processing apparatus. Specifically, the training device includes a hidden loss calculation module 31, a recovery loss calculation module 32, a low-frequency loss calculation module 33, a loss summarization module 34, and a parameter adjustment module 35.

[0131] The hidden loss calculation module 31 is used to perform step S31: calculate the loss between the carrier image sample and the corresponding generated carrier image to obtain the hidden loss L. emb .

[0132] Among them, the L1 norm or L2 norm is selected to calculate the loss between the carrier image sample and the corresponding generated carrier image, and the hiding loss L emb The expression is:

[0133]

[0134] Among them, l w It is either the L1 norm or the L2 norm; This refers to the nth carrier image sample in the training samples; A secret image is generated for the nth carrier image sample and the secret image sample.

[0135] The recovery loss calculation module 32 is used to perform step S32: calculate the loss between the secret image sample and the corresponding recovered secret image to obtain the recovery loss L. ext .

[0136] In this process, either the L1 norm or the L2 norm is used to calculate the loss between the secret image sample and the corresponding recovered secret image, where the recovery loss L... ext The expression is:

[0137]

[0138] in, It follows a standard normal distribution; It is either the L1 norm or the L2 norm; This is the nth encrypted image sample in the training samples; The secret image is recovered from the nth secret image sample.

[0139] The low-frequency loss calculation module 33 is used to execute step S33: calculate the loss between the low-frequency carrier frequency image of the carrier image sample and the low-frequency carrier frequency image of the corresponding generated carrier density image, and obtain the low-frequency loss L. freq .

[0140] Among them, the low-frequency carrier frequency image is the carrier frequency image corresponding to the low frequency of the carrier image, and the low-frequency carrier density frequency image is the carrier density frequency image corresponding to the low frequency of the carrier density image. This is achieved through low-frequency loss L... freq Adjusting the relevant parameters of the image processing device can make the low-frequency data of the secret image and the carrier image nearly identical, thereby hiding the secret image in the high-frequency part of the carrier image and improving the concealment of the secret image in the secret image.

[0141] The loss between the low-frequency carrier frequency image of the carrier image sample and the low-frequency carrier density image of the corresponding generated carrier density image is calculated using either the L1 norm or the L2 norm. The low-frequency loss L... freq The expression is:

[0142]

[0143] in, It is either the L1 norm or the L2 norm; The low-frequency carrier image of the nth carrier image sample in the training samples; The low-frequency carrier density image generated for the nth carrier image sample.

[0144] Loss summarization module 34 is used to perform step S34: summarizing the hidden loss L emb Recovery of losses L ext and low-frequency loss L freq The total loss L is obtained by summing the results. total .

[0145] Among them, by hiding the loss L emb Recovery of losses L ext and low-frequency loss L freq The hidden loss L is calculated by multiplying it by different loss coefficients and then summing the results. emb Recovery of losses L ext and low-frequency loss L freq The total loss is L. total The expression is:

[0146] L total =λ emb L emb +λ ext L ext +λ freq L freq

[0147] Where, λ emb To conceal the loss L emb The loss coefficient; λ ext To recover the loss L ext The loss coefficient; λ freq For low-frequency loss L freq The loss coefficient.

[0148] Parameter adjustment module 35 is used to execute step S35: via total loss L total The trainable parameters in the first affine transformation module 13, the second affine transformation module 14, the first inverse affine transformation module 23, the second inverse affine transformation module 25, and the depth feature extraction module 17 in the image processing device are adjusted until the total loss L is reached. total It has reached convergence.

[0149] Where the total loss L total If convergence is not achieved, the trainable parameters in the image processing device are adjusted, and the process returns to steps S31-S34; if the total loss L total Training ends when convergence is achieved.

[0150] Compared to existing technologies, this invention connects the transformation results of multiple affine transformations using dense connections, thus preserving more image features of the complex textured carrier image and the secret image. This ensures the quality of the carrier image, enabling it to better conceal the secret image, thereby improving the carrier image's resistance to steganalysis and enhancing its security. Simultaneously, the image features of the secret image are preserved to a greater extent, improving the accuracy of secret image recovery.

[0151] Furthermore, this invention adds depth image features of the carrier image and the secret image to the secret image, so that more deep and fine-grained information of the secret image is hidden in the carrier image, thereby enabling the recovery of a high-quality secret image with strong robustness.

[0152] Furthermore, this invention trains affine transformation parameters using low-frequency loss, enabling the secret image to be hidden within the high-frequency components of the carrier image. The resulting secret image is more concealed and harder to detect by steganalysis.

[0153] Based on the same inventive concept, this application also provides an electronic device, which can be a server, desktop computing device, or mobile computing device (e.g., laptop computing device, handheld computing device, tablet computer, netbook, etc.) or other terminal device. The device includes one or more processors and a memory, wherein the processor is used to execute an image processing method according to an embodiment of the method; and the memory is used to store a computer program executable by the processor.

[0154] Based on the same inventive concept, this application also provides a computer-readable storage medium corresponding to the aforementioned embodiments of the image processing method. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the steps of the image processing method described in any of the above embodiments.

[0155] This application may take the form of a computer program product implemented on one or more storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing program code. Computer storage media include permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information may be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to: phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.

[0156] The embodiments described above are merely examples of several implementations of the present invention, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and the present invention also intends to include these modifications and variations.

Claims

1. An image processing method, characterized by, Including image hiding steps: A carrier image is acquired and converted to the frequency domain to obtain a carrier frequency image; Obtain the secret image and convert it to the frequency domain to obtain the secret frequency image; The carrier frequency image and the secret frequency image are stitched together to obtain a first stitched image; Perform n consecutive affine transformations on the first stitched image, and obtain n first affine transformation images for each affine transformation. The n first affine transformation images are stitched together and then subjected to affine transformation to obtain the second affine transformation image; The second affine transformed image is subjected to channel compression to obtain the first compressed image; Spatial domain transformation is performed on the portion of the carrier frequency image in the first compressed image to obtain the carrier-compressed image.

2. The method of claim 1, wherein, After stitching the carrier frequency image and the secret frequency image to obtain the first stitched image, the method further includes the following steps: Depth features are extracted from the first stitched image to obtain depth image features; The depth image features and n first affine transformation images are concatenated and then subjected to affine transformation to obtain the second affine transformation image.

3. The method of claim 2, wherein, It also includes image restoration steps: The encrypted image is acquired and converted to the frequency domain to obtain an encrypted frequency image; Obtain auxiliary variables and convert them to the frequency domain to obtain auxiliary frequency variables; All the carrier frequency images and the auxiliary frequency variables are stitched together to obtain a second stitched image; After copying the channels of the second stitched image, an inverse affine transformation is performed to obtain the first inverse affine transformation image; The first inverse affine transformation image is compressed to obtain a second compressed image; Perform n consecutive inverse affine transformations on the second compressed image to obtain the second inverse affine transformed image; The secret image is obtained by performing a spatial domain transformation on the part corresponding to the auxiliary variable in the second inverse affine transformation image.

4. The method according to claim 3, characterized in that, The trainable parameters of the affine transformation are trained through the following steps: The low-frequency loss is obtained by calculating the loss between the low-frequency carrier frequency image of the carrier image sample and the low-frequency carrier density frequency image of the corresponding generated carrier density image. The trainable parameters are adjusted using the low-frequency loss.

5. The method according to claim 4, characterized in that, The trainable parameters in the affine transformation and the inverse affine transformation are trained through the following steps: The hidden loss is obtained by calculating the loss between the carrier image sample and the corresponding generated carrier image. The loss between the secret image sample and the corresponding recovered secret image is calculated to obtain the recovery loss; Calculate the loss between the low-frequency carrier frequency image of the carrier image sample and the low-frequency carrier frequency image of the corresponding generated carrier density image; The total loss is obtained by multiplying the hidden loss, the recovery loss, and the low-frequency loss by different loss coefficients and then summing them. The trainable parameters in the affine transformation, the inverse affine transformation, and the deep feature extraction are adjusted using the total loss until the total loss converges.

6. An image processing apparatus, characterized in that, Includes a steganography unit, the steganography unit comprising: The carrier image conversion module is used to acquire the carrier image and convert the carrier image to the frequency domain to obtain a carrier frequency image; A secret image conversion module is used to acquire the secret image and convert the secret image to the frequency domain to obtain a secret frequency image; The first stitching module is used to stitch the carrier frequency image and the secret frequency image together to obtain a first stitched image; The first affine transformation module is used to perform n consecutive affine transformations on the first stitched image, and each affine transformation yields n first affine transformation images. The second affine transformation module is used to stitch together n first affine transformation images and then perform an affine transformation to obtain a second affine transformation image. The first compression module is used to perform channel compression on the second affine transformation image to obtain a first compressed image; The first spatial domain conversion module is used to perform spatial domain conversion on the portion of the carrier frequency image in the first compressed image to obtain a compressed image.

7. The apparatus according to claim 6, characterized in that, The steganography unit further includes: The depth feature extraction module is used to extract depth features from the first stitched image to obtain depth image features; The second affine transformation module is replaced by a module that concatenates the depth image features and n first affine transformation images and then performs an affine transformation to obtain a second affine transformation image.

8. The apparatus according to claim 7, characterized in that, It also includes a recovery unit, which comprises: The encrypted image conversion module is used to acquire the encrypted image and convert the encrypted image to the frequency domain to obtain an encrypted frequency image; The auxiliary variable conversion module is used to acquire auxiliary variables and convert the auxiliary variables to the frequency domain to obtain auxiliary frequency variables; The second stitching module is used to stitch together all the carrier frequency images and the auxiliary frequency variables to obtain a second stitched image; The first inverse affine transformation module is used to perform inverse affine transformation on the second stitched image after channel copying to obtain the first inverse affine transformation image. The second compression module is used to perform channel compression on the first inverse affine transformation image to obtain a second compressed image. The second inverse affine transformation module is used to perform n consecutive inverse affine transformations on the second compressed image to obtain the second inverse affine transformation image. The second spatial domain transformation module is used to transform the spatial domain of the part corresponding to the auxiliary variable in the second inverse affine transformation image to obtain the secret image.

9. The apparatus according to claim 8, characterized in that, The trainable parameters in the first affine transformation module and the second affine transformation module are trained through the following steps: The low-frequency loss is obtained by calculating the loss between the low-frequency carrier frequency image of the carrier image sample and the low-frequency carrier density frequency image of the corresponding generated carrier density image. The trainable parameters are adjusted using the low-frequency loss.

10. The apparatus according to claim 9, characterized in that, The trainable parameters in the first affine transformation module, the second affine transformation module, the first inverse affine transformation module, and the second inverse affine transformation module are trained through the following steps: The hidden loss is obtained by calculating the loss between the carrier image sample and the corresponding generated carrier image. The loss between the secret image sample and the corresponding recovered secret image is calculated to obtain the recovery loss; Calculate the loss between the low-frequency carrier frequency image of the carrier image sample and the low-frequency carrier frequency image of the corresponding generated carrier density image; The total loss is obtained by multiplying the hidden loss, the recovery loss, and the low-frequency loss by different loss coefficients and then summing them. The trainable parameters in the first affine transformation module, the second affine transformation module, the first inverse affine transformation module, the second inverse affine transformation module, and the deep feature extraction module are adjusted using the total loss until the total loss converges.