WO2022199180A1 - Method for dynamic image steganography, apparatus, device, and storage medium - Google Patents

Method for dynamic image steganography, apparatus, device, and storage medium Download PDF

Info

Publication number
WO2022199180A1
WO2022199180A1 PCT/CN2021/141728 CN2021141728W WO2022199180A1 WO 2022199180 A1 WO2022199180 A1 WO 2022199180A1 CN 2021141728 W CN2021141728 W CN 2021141728W WO 2022199180 A1 WO2022199180 A1 WO 2022199180A1
Authority
WO
WIPO (PCT)
Prior art keywords
frame
image
carrier
carrier image
value
Prior art date
Application number
PCT/CN2021/141728
Other languages
French (fr)
Chinese (zh)
Inventor
万璐敏
黄璐璐
Original Assignee
天翼云科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 天翼云科技有限公司 filed Critical 天翼云科技有限公司
Publication of WO2022199180A1 publication Critical patent/WO2022199180A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/0021Image watermarking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/51Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing

Definitions

  • the present application relates to the technical field of information security, and in particular, to a dynamic image steganography method, apparatus, device, and readable storage medium.
  • Steganography is an important branch in the field of information hiding technology, which can achieve the purpose of covert communication by embedding secret messages into images, audio, video, text and other files.
  • Image has the characteristics of universality, easy access and sufficient redundant data.
  • Image steganography technology using it as the information hiding carrier is one of the research focuses in this field.
  • Image steganography methods in the related art are proposed on static images, and are only applicable to true-color images, and there is no steganography method based on dynamic index images.
  • the purpose of the present application is to provide a dynamic image steganography method, device, device and readable storage medium, at least to a certain extent, to overcome the problem that the static image steganography method in the related art is not suitable for dynamic index images.
  • a dynamic image steganography method comprising: obtaining a color index image of each frame of carrier images in a multi-frame carrier image, wherein the multi-frame carrier images are obtained from the dynamic image, the color
  • the index image includes an index matrix and a palette; modify each value in the index matrix to obtain a modified index matrix; index the palette according to the index matrix to obtain the pixel value of each channel of each frame of carrier image ; Index the palette according to the modified index matrix to obtain the modified pixel value of each channel of each frame carrier image; According to the pixel value of each channel of the each frame carrier image and each channel of the each frame carrier image Obtain the distortion cost matrix of each frame carrier image based on the modified pixel values of The steganographic index matrix of each frame of carrier image and the palette of each frame of carrier image are used to obtain multiple frames of steganographic images to synthesize dynamic steganographic images.
  • the method further includes: for each channel of each frame of the carrier image, using a high-pass filter to filter the pixels of each channel and then obtaining the absolute value of the filtering result; using a low-pass filter to filter the The absolute value of the result is smoothed to obtain the reciprocal of the final residual, and the distortion cost value of each channel of each frame of carrier image is obtained respectively;
  • Obtaining the distortion cost matrix of each frame carrier image by modifying the pixel value of each channel includes: respectively obtaining the difference between the pixel value of each channel of each frame carrier image and the modified pixel value; The distortion cost matrix of each frame carrier image is obtained from the difference with the modified pixel value and the distortion cost value of each channel of each frame carrier image.
  • the method further includes: acquiring a color index image of a carrier image of a current frame, where the carrier image of the current frame is any frame after the carrier image of the first frame in the multi-frame carrier images; Perform grayscale conversion on the color index image of the carrier image of the current frame to obtain the grayscale image of the carrier image of the current frame; obtain the color index image of the carrier image of the previous frame of the carrier image of the current frame; The index image is converted into grayscale to obtain the grayscale image of the previous frame of the carrier image; the total distortion cost value of each frame of the carrier image is multiplied by the sum of the squares of the difference between the pixel value of each channel and the modified pixel value, Obtaining the distortion cost matrix of the carrier image of each frame includes: squaring the grayscale image of the carrier image of the current frame and the grayscale image of the carrier image of the previous frame, and obtaining each pixel in the carrier image of the current frame.
  • the total distortion cost of each frame of carrier image is multiplied by the sum of the squares of the difference between the pixel value of each channel and the modified pixel value to obtain the distortion cost of each frame of carrier image
  • the matrix includes: obtaining a brightness change threshold; obtaining a distortion cost weight, where the distortion cost weight is a value greater than 1; when the brightness change of a pixel in the current frame carrier image is not greater than the brightness change threshold, the The total distortion cost value of the carrier image of the current frame is multiplied by the square sum of the difference between the pixel value of each channel of the pixel and the modified pixel value, and then multiplied by the distortion cost weight to obtain the color change amount of the pixel to obtain the Distortion cost matrix for each frame of carrier image.
  • the method further includes: performing a binarization process on the color index images of the carrier images of each frame to obtain a binary image of the carrier images of each frame; extracting the binary images of the carrier images of each frame The boundary information of the value image, obtain the boundary information value of each pixel of each frame carrier image; obtain the true boundary value; according to the pixel value of each channel of each frame carrier image and the pixel value of each channel of each frame carrier image and the frame carrier image Modifying the pixel value to obtain the distortion cost matrix of the carrier image of each frame includes: for each pixel of the carrier image of each frame, when the boundary information value of the pixel is equal to the true boundary value, according to the pixel value of each channel of the pixel and the modified pixel value to obtain the distortion cost of this pixel to obtain the distortion cost matrix of the carrier image of each frame.
  • the method further includes: obtaining a preset distortion value; obtaining the pixel value according to the pixel value of each channel of the carrier image of each frame and the modified pixel value of each channel of the carrier image of each frame
  • the distortion cost matrix of each frame of carrier image further includes: for each pixel of each frame of carrier image, when the boundary information value of the pixel is not equal to the true boundary value, the obtained distortion cost of the pixel is the preset distortion value, to obtain the distortion cost matrix of the carrier image of each frame.
  • a dynamic image steganography device comprising: an index image obtaining module configured to obtain a color index image of each frame of carrier images in a multi-frame carrier image, the multi-frame carrier images from the Obtained from a dynamic image, the color index image includes an index matrix and a palette; an index value modification module is used to modify each value in the index matrix to obtain a modified index matrix; the first pixel value obtaining module, using indexing the palette according to the index matrix to obtain pixel values of each channel of the carrier image of each frame; a second pixel value obtaining module for indexing the palette according to the modified index matrix to obtain each frame The modified pixel value of each channel of the carrier image; the distortion cost obtaining module is used to obtain the pixel value of each frame of the carrier image according to the pixel value of each channel of the carrier image of each frame and the modified pixel value of each channel of the carrier image of each frame.
  • Distortion cost matrix a steganographic index matrix obtaining module, used for embedding the information to be steganographic into the index matrix based on the distortion cost matrix of each frame of carrier image, to obtain the steganographic index matrix of each frame of carrier image; steganographic image acquisition
  • the module is configured to obtain multiple frames of steganographic images according to the steganographic index matrix of the carrier images of each frame and the palette of the carrier images of each frame, so as to synthesize dynamic steganographic images.
  • the device further includes: a high-pass filtering module, configured to filter the pixels of each channel with a high-pass filter for each channel of each frame of the carrier image, and then obtain the absolute value of the filtering result; the channel distortion cost The calculation module is used for smoothing the absolute value of the filtering result by using a low-pass filter to obtain the final residual and then taking the reciprocal to obtain the distortion cost value of each channel of each frame of carrier image; the distortion cost obtaining module includes: The pixel difference module is used to obtain the difference between the pixel value of each channel of each frame carrier image and the modified pixel value respectively; the image distortion cost calculation module is used to modify the pixel value according to the pixel value of each channel of each frame carrier image and the modified pixel value. The difference of the values and the distortion cost value of each channel of the carrier image of each frame obtains the distortion cost matrix of the carrier image of each frame.
  • a high-pass filtering module configured to filter the pixels of each channel with a high-pass filter for each channel of each frame of the carrier image, and then
  • the index image obtaining module includes: an initial index image obtaining module for obtaining an initial index matrix and an initial palette of each frame of carrier images; a palette updating module for converting the The initial palette of each frame carrier image is reordered according to the square sum of each channel value to obtain the palette of each frame carrier image; the index matrix update module is used for the initial index matrix and initial palette according to the initial index matrix and initial palette of each frame carrier image.
  • Described distortion cost obtaining module comprises: pixel change calculation module, for obtaining the square of the difference of the pixel value of each channel of described each frame carrier image and the modification pixel value And; Distortion cost value calculation module, for averaging the distortion cost value of each channel of each frame carrier image to obtain the total distortion cost value of each frame carrier image; Distortion cost matrix calculation module, for describing each frame The total distortion cost value of the carrier image is multiplied by the square sum of the difference between the pixel value of each channel and the modified pixel value to obtain the distortion cost matrix of the carrier image of each frame.
  • the apparatus further includes: a current carrier image obtaining module, configured to acquire a color index image of the current frame carrier image, where the current frame carrier image is the first frame carrier in the multi-frame carrier images Any frame after the image; the grayscale conversion module is used to perform grayscale conversion on the color index image of the current frame carrier image to obtain the grayscale image of the current frame carrier image; the previous frame carrier image acquisition module is used to obtain all The color index image of the previous frame carrier image of the current frame carrier image; the grayscale conversion module is also used to perform grayscale conversion on the color index image of the previous frame steganographic image to obtain the grayscale image of the previous frame carrier image.
  • a current carrier image obtaining module configured to acquire a color index image of the current frame carrier image, where the current frame carrier image is the first frame carrier in the multi-frame carrier images Any frame after the image
  • the grayscale conversion module is used to perform grayscale conversion on the color index image of the current frame carrier image to obtain the grayscale image of the current frame carrier image
  • the previous frame carrier image acquisition module is used
  • Described distortion cost matrix calculation module comprises: brightness change amount calculation module, is used to square after the gray scale of described current frame carrier image and the gray scale of described previous frame carrier image are made difference, obtain current frame The brightness change amount of each pixel in the carrier image; the brightness change threshold value obtaining module is used to obtain the brightness change threshold value; the distortion cost matrix calculation module is also used for the brightness change amount of one pixel in the current frame When the brightness changes the threshold value, multiply the total distortion cost value of the carrier image of the current frame and the sum of the squares of the difference between the pixel value of each channel of the pixel and the modified pixel value to obtain the color change amount of the pixel to obtain the Distortion cost matrix for the frame carrier image.
  • the distortion cost matrix calculation module includes: a brightness change threshold obtaining module, used to obtain a brightness change threshold; a distortion cost weight obtaining module, used to obtain a distortion cost weight, where the distortion cost weight is greater than or equal to The value of 1; the distortion cost matrix calculation module is also used to compare the total distortion cost value of the current frame carrier image with the The square sum of the difference between the pixel value of each channel of the pixel and the modified pixel value is multiplied by the distortion cost weight to obtain the color change amount of the pixel, so as to obtain the distortion cost matrix of the carrier image of each frame.
  • the apparatus further includes: a binarization processing module configured to perform binarization processing on the color index images of the carrier images of each frame to obtain a binary image of the carrier images of each frame;
  • the extraction module is used to extract the boundary information of the binary images of the carrier images of each frame, and obtain the boundary information value of each pixel of the carrier image of each frame;
  • the true boundary value acquisition module is used to obtain the true boundary value;
  • the distortion cost is also used for: for each pixel of each frame of the carrier image, when the boundary information value of the pixel is equal to the true boundary value, obtain the distortion cost of the pixel according to the pixel value of each channel of the pixel and the modified pixel value , to obtain the distortion cost matrix of the carrier image of each frame.
  • the distortion cost matrix calculation module further includes: a preset distortion value acquisition module for acquiring a preset distortion value; the distortion cost matrix calculation module is further used for: for each frame of the carrier image For each pixel, when the boundary information value of the pixel is not equal to the true boundary value, the obtained distortion cost of the pixel is the preset distortion value, so as to obtain the distortion cost matrix of the carrier image of each frame.
  • an apparatus comprising: a memory, a processor, and executable instructions stored in the memory and executable in the processor, the processor executing the executable instructions When implementing any of the above methods.
  • a computer-readable storage medium on which computer-executable instructions are stored, and when the executable instructions are executed by a processor, any one of the above methods is implemented.
  • the dynamic image steganography method modifies each value in the index matrix by obtaining a color index image including an index matrix and a color palette of each frame of the carrier image in the multi-frame carrier image from the dynamic image. After the modified index matrix is obtained, each frame carrier is obtained according to the pixel value of each channel of each frame carrier image obtained by the index matrix index palette and the modified pixel value of each channel of each frame carrier image obtained by modifying the index matrix index palette.
  • the distortion cost matrix of the image and then based on the distortion cost matrix of the carrier image of each frame, the steganographic information is embedded in the index matrix to obtain the steganographic index matrix of the carrier image of each frame, and finally the steganographic index matrix of the carrier image of each frame and the carrier image of each frame are obtained.
  • the palette of the image obtains multiple frames of steganographic images to synthesize dynamic steganographic images, so that steganography based on dynamic index images can be realized.
  • FIG. 1 shows a schematic diagram of a system structure in an embodiment of the present application.
  • FIG. 2 shows a flowchart of a dynamic image steganography method in an embodiment of the present application.
  • FIG. 3 shows a schematic diagram of the processing procedure of step S202 shown in FIG. 2 in an embodiment.
  • Fig. 4 is a flowchart of a method for obtaining a distortion cost according to an exemplary embodiment.
  • Fig. 5 is a flowchart of an image boundary method according to an exemplary embodiment.
  • FIG. 6 is a frame diagram of an animation expression steganography method shown in FIGS. 2 to 5 .
  • FIG. 7 is a schematic diagram of a steganographic process of each frame of images shown in FIGS. 2 to 6 .
  • FIG. 8 is an example diagram of the results of a steganography experiment shown in FIGS. 2 to 6 .
  • FIG. 9 is a schematic diagram illustrating a comparison of distortion costs between the dynamic image steganography method shown in FIGS. 2 to 6 and the method in the prior art.
  • FIG. 10 is a schematic diagram showing the comparison of prices between the dynamic image steganography method shown in FIGS. 2 to 6 and the prior art method.
  • FIG. 11 is a schematic diagram illustrating a comparison of distortion costs between the dynamic image steganography method shown in FIGS. 2 to 6 and the prior art method.
  • FIG. 12 shows a block diagram of a dynamic image steganography apparatus in an embodiment of the present application.
  • FIG. 13 shows a block diagram of another dynamic image steganography apparatus in an embodiment of the present application.
  • FIG. 14 shows a schematic structural diagram of an electronic device in an embodiment of the present application.
  • Example embodiments will now be described more fully with reference to the accompanying drawings.
  • Example embodiments can be embodied in various forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this application will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art.
  • the drawings are merely schematic illustrations of the present application and are not necessarily drawn to scale.
  • the same reference numerals in the drawings denote the same or similar parts, and thus their repeated descriptions will be omitted.
  • first, second, etc. are used for descriptive purposes only, and should not be construed as indicating or implying relative importance or implying the number of indicated technical features. Thus, a feature defined as “first” or “second” may expressly or implicitly include one or more of that feature.
  • plural means at least two, such as two, three, etc., unless expressly and specifically defined otherwise.
  • the symbol “/” generally indicates that the related objects are an “or” relationship.
  • connection should be understood in a broad sense, for example, it may be an electrical connection or may communicate with each other; it may be directly connected or indirectly connected through an intermediate medium.
  • connection should be understood in a broad sense, for example, it may be an electrical connection or may communicate with each other; it may be directly connected or indirectly connected through an intermediate medium.
  • the present application provides a dynamic image steganography method, by obtaining a color index image including an index matrix and a color palette of each frame of carrier images in a multi-frame carrier image from a dynamic image, and performing a process on each value in the index matrix. After modifying and obtaining the modified index matrix, each frame is obtained according to the pixel value of each channel of each frame carrier image obtained by the index matrix index palette and the modified pixel value of each channel of each frame carrier image obtained by modifying the index matrix index palette.
  • the distortion cost matrix of the carrier image and then embedding the information to be steganographic into the index matrix based on the distortion cost matrix of the carrier image of each frame to obtain the steganographic index matrix of the carrier image of each frame, and finally according to the steganographic index matrix of the carrier image of each frame and each frame
  • the palette of the carrier image is used to obtain multiple frames of steganographic images to synthesize dynamic steganographic images, so that steganography of dynamic images can be realized.
  • FIG. 1 shows an exemplary system architecture 10 to which the dynamic image steganography method or dynamic image steganography apparatus of the present application may be applied.
  • the system architecture 10 may include end devices 102 , a network 104 and a server 106 .
  • the terminal device 102 can be various electronic devices with a display screen and supporting input and output, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, wearable devices, virtual reality devices, smart homes, etc. .
  • the network 104 is the medium used to provide the communication link between the terminal device 102 and the server 106 .
  • the network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
  • the server 106 may be a server or server cluster or the like that provides various services.
  • the user can use the terminal device 102 to interact with the server 106 through the network 104 to receive or send data and the like.
  • the user uses the terminal device 102 to upload the information to be steganographic and the carrier dynamic image to the server 106 through the network 104 , and then obtains the steganographic dynamic image transmitted by the server 106 through the network 104 through the terminal device 102 .
  • the user uses the terminal device 102 to input the steganographic parameters, which are then uploaded to the server 106 through the network 104 .
  • terminal devices, networks and servers in FIG. 1 are merely illustrative. There can be any number of terminal devices, networks and servers according to implementation needs.
  • Fig. 2 is a flow chart of a dynamic image steganography method according to an exemplary embodiment.
  • the dynamic image steganography method shown in FIG. 2 can be applied to, for example, the server side of the above-mentioned system, and can also be applied to the terminal device of the above-mentioned system.
  • the method 20 provided by this embodiment of the present application may include the following steps.
  • step S202 a color index image of each frame of the carrier image in the multi-frame carrier image is obtained, the multi-frame carrier image is obtained from the dynamic image, and the color index image includes an index matrix and a color palette.
  • a dynamic image is an image that changes shape over time, and can be an image in the Graphics Interchange Format (GIF).
  • GIF Graphics Interchange Format
  • the multiple image data in a file is read out one by one and displayed on the screen, that is, GIF animation, such as animated expressions, animations converted from short videos, and so on.
  • an animated expression may be decomposed to obtain multiple frames of color-indexed images. It can read the animation expression, split the animation expression into multi-frame color index images, and record the basic information of each frame obtained, such as: index matrix, palette, delay time, frame number n, image height h, width w and many more.
  • reordering the initial color palette can obtain a new color palette, and generating a new color palette corresponding to the new color palette.
  • the new index matrix of the color palette the specific implementation can refer to FIG. 3 .
  • each value in the index matrix is modified to obtain a modified index matrix.
  • the index matrix is a matrix that indexes the color (pixel value) of each channel of each pixel from the palette, and modifying the index matrix is equivalent to modifying the pixel value of each channel.
  • the modification method can be plus 1 or minus 1 and so on.
  • the index matrix of the color index map of the current frame (the kth frame, where k is a positive integer greater than 1) can be recorded as IN k , and the color palette as MN k .
  • step S206 the color palette is indexed according to the index matrix, and the pixel value of each channel of each frame of carrier image is obtained.
  • step S208 the modified pixel value of each channel of the carrier image of each frame is obtained by indexing the palette according to the modified index matrix.
  • step S210 the distortion cost matrix of each frame of carrier image is obtained according to the pixel value of each channel of each frame of carrier image and the modified pixel value of each frame of carrier image.
  • a high-pass filter can be used to filter the pixels of each channel and then the absolute value of the filtering result can be obtained, and then a low-pass filter can be used to smooth the absolute value of the filtering result to obtain the final residual, and then take the reciprocal.
  • the distortion cost value of each channel of each frame of carrier image is obtained respectively.
  • each channel After obtaining the distortion cost value of each channel, obtain the difference between the pixel value of each channel of the carrier image of each frame and the modified pixel value, and then according to the difference between the pixel value and the modified pixel value of each channel of the carrier image of each frame and the The distortion cost value of each channel of the carrier image is used to obtain the distortion cost matrix of each frame of carrier image.
  • the square sum of the difference between the pixel value of each channel of each frame of carrier image and the modified pixel value can be obtained, and then the The total distortion cost value of each frame carrier image is averaged to obtain the total distortion cost value of each frame carrier image, and then the total distortion cost value of each frame carrier image is multiplied by the square sum of the difference between the pixel value of each channel and the modified pixel value to obtain each frame carrier image.
  • the distortion cost matrix of the image when the method of FIG. 3 is used to obtain the color index image, the square sum of the difference between the pixel value of each channel of each frame of carrier image and the modified pixel value can be obtained, and then the The total distortion cost value of each frame carrier image is averaged to obtain the total distortion cost value of each frame carrier image, and then the total distortion cost value of each frame carrier image is multiplied by the square sum of the difference between the pixel value of each channel and the modified pixel value to obtain each frame carrier image.
  • the distortion cost matrix of the image when the method of FIG. 3 is used to obtain the color index
  • "*" is a linear convolution operation, and the convolution adopts the form of symmetrical filling so that the image size after convolution remains unchanged; H is a high-pass filter, and L 1 and L 2 are different low-pass filters.
  • the method of the present application is to send the index matrix into a steganography algorithm such as the STC coding framework for steganography. After performing a ⁇ 1 operation on the index matrix, the index value changes by 1, and the color palette is reordered according to the square of the pixel value.
  • the pixel is changed from R1(i,j), G1(i,j), B1(i,j) to R2(i,j), G2(i,j), B2(i,j), so it is necessary to obtain
  • the real change in color is the sum of the squares of the difference between the two multiplied by the ⁇ .
  • R1(i,j), G1(i,j), B1(i,j) are the palettes corresponding to the index values at the position (i,j) of the index matrix IN k of the current frame
  • the three-channel value in MN k , R2(i,j), G2(i,j), B2(i,j) are the three-channel value corresponding to the new index after the index value ⁇ 1, then the current frame can be obtained
  • the final distortion cost value ⁇ t (i, j) of the pixel at position (i, j) is:
  • ⁇ t (i,j) ⁇ ((R1(i,j)-R2(i,j)) 2 +(G1(i,j)-G2(i,j)) 2 +(B1(i, j)-B2(i,j)) 2 ) (5)
  • the method of FIG. 3 when the method of FIG. 3 is used to obtain the color index image, after obtaining the square of the difference between the pixel value of each channel of each frame of carrier image and the modified pixel value, the The distortion cost value is multiplied by the square of the difference between the pixel value of each channel and the modified pixel value, and then the products of the three channels are summed to obtain the distortion cost matrix of each frame of carrier image.
  • the final distortion cost value calculated as in Equation (5) can be corrected by judging whether the change of pixels between frames is suitable for hiding information. Refer to Figure 4.
  • step S212 the information to be steganographic is embedded in the index matrix based on the distortion cost matrix of each frame of carrier image, and the steganographic index matrix of each frame of carrier image is obtained.
  • the secret information can be embedded by binary steganographic coding, such as STC coding, the distortion cost matrix, index matrix and secret value composed of the distortion cost function value of each pixel point calculated by formula (5) or formula (6)
  • the information is sent into the STC coding framework to obtain the steganographic index matrix of the carrier image of each frame to generate the dense image.
  • the specific implementation of the embedded information can refer to FIG. 7 .
  • step S214 multiple frames of steganographic images are obtained according to the steganographic index matrix of each frame of carrier image and the palette of each frame of carrier image to synthesize dynamic steganographic images.
  • a dynamic image with hidden secret information can be obtained by combining and outputting the secret steganographic images of multiple frames as a dynamic image.
  • each value in the index matrix is modified by obtaining a color index image including an index matrix and a color palette of each frame of the carrier image in the multi-frame carrier image from the dynamic image.
  • each frame carrier is obtained according to the pixel value of each channel of each frame carrier image obtained by the index matrix index palette and the modified pixel value of each channel of each frame carrier image obtained by modifying the index matrix index palette.
  • the distortion cost matrix of the image and then based on the distortion cost matrix of the carrier image of each frame, the steganographic information is embedded in the index matrix to obtain the steganographic index matrix of the carrier image of each frame, and finally the steganographic index matrix of the carrier image of each frame and the carrier image of each frame are obtained.
  • the color palette of the image obtains multiple frames of steganographic images to synthesize dynamic steganographic images, so that steganography based on dynamic index images can be realized, which is more suitable for color images and is more concealed and difficult to detect; it can make steganography based on STC coding.
  • the writing method is more suitable for hiding the information to be sent in a public dynamic carrier image for transmission, realizing the transmission of the carrier at the transceiver end, and improving the information embedding rate and security.
  • FIG. 3 shows a schematic diagram of the processing procedure of step S202 shown in FIG. 2 in an embodiment.
  • the foregoing step S202 may further include the following steps.
  • Step S2022 acquiring the initial index matrix and initial color palette of each frame of carrier image.
  • Step S2024 Reorder the initial palettes of the carrier images of each frame according to the sum of squares of the values of each channel to obtain the palette of the carrier images of each frame.
  • Step S2026 Obtain the index matrix of each frame of carrier image according to the initial index matrix of each frame of carrier image, the initial palette, and the palette.
  • the read-in initial palette can be reordered according to the sum of the squares of the channel values to generate a new palette, and a new palette corresponding to the new palette can be generated. New index matrix for palettes.
  • the palette reordering method provided by the embodiment of the present application, by reordering the initial palette according to the sum of the squares of the values of each channel, the complexity of modifying the carrier image is increased, so that it is possible to improve the concealment of the index image. Write stealth and detection resistance.
  • Fig. 4 is a flowchart of a method for obtaining a distortion cost according to an exemplary embodiment.
  • the method shown in FIG. 4 can be applied to, for example, the server side of the above-mentioned system, and can also be applied to the terminal device of the above-mentioned system.
  • the method 40 provided by this embodiment of the present application may include the following steps.
  • step S402 a color index image of the carrier image of the current frame is obtained, and the carrier image of the current frame is any frame after the carrier image of the first frame of the carrier images of the multiple frames.
  • step S404 grayscale conversion is performed on the color index image of the carrier image of the current frame to obtain a grayscale image of the carrier image of the current frame.
  • step S406 the color index image of the carrier image of the previous frame of the carrier image of the current frame is acquired.
  • step S408 grayscale conversion is performed on the color index image of the steganographic image of the previous frame to obtain the grayscale image of the carrier image of the previous frame.
  • step S410 the difference between the grayscale image of the carrier image of the current frame and the grayscale image of the carrier image of the previous frame is squared to obtain the luminance variation of each pixel in the carrier image of the current frame.
  • step S412 a luminance change threshold is obtained.
  • step S414 when the luminance variation of a pixel in the current frame carrier image is greater than the luminance variation threshold, the sum of the squares of the difference between the total distortion cost value of the current frame carrier image and the pixel value of each channel of the pixel and the modified pixel value is calculated Multiply to obtain the color change amount of the pixel to obtain the distortion cost matrix of each frame of carrier image.
  • step S4162 when the luminance variation of a pixel in the current frame carrier image is not greater than the luminance variation threshold, a distortion cost weight is obtained, and the distortion cost weight is a value greater than 1.
  • step S4164 the total distortion cost value of the current frame carrier image is multiplied by the square sum of the difference between the pixel value of each channel of the pixel and the modified pixel value, and then multiplied by the distortion cost weight to obtain the color change amount of the pixel, to obtain the distortion cost matrix of each frame carrier image.
  • the brightness change threshold can be recorded as ⁇
  • the distortion cost weight is ⁇
  • ⁇ >1 then equation (5) can be rewritten as:
  • ((G ij )-(B ij )) 2 is compared with the preset threshold ⁇ , if it is greater than the threshold, it indicates that the area is a region with large changes, suitable for hiding information; if it is smaller than the threshold, then It shows that this area is a flat area, which is not suitable for steganography, so the distortion cost value needs to be multiplied by a weight ⁇ greater than 1.
  • the carrier dynamic image is an animated expression
  • the character line is the main component of the animated expression
  • the pixel values of each point on the line are similar; at the same time, there is a large area of coloring in the image, and The pixel values in the same area are the same, so if you modify the shaded area, it is easy to find abnormalities in dense images.
  • the above characteristics can be considered as a constraint on formula (6), the part of the contour (boundary) area of the image is calculated according to formula (6), and the distortion cost value is set to a preset distortion value in the non-contour area, and the preset The distortion value is a large threshold, that is, no information is embedded in this part, which can effectively improve the quality of dense images.
  • FIG. 5 For a specific implementation of the method for extracting image boundary information, reference may be made to FIG. 5 .
  • the method for obtaining the distortion cost when calculating the distortion cost of each pixel, by considering whether the change in the brightness of the corresponding pixels between frames is suitable for hiding information, the method can be more suitable for steganography of dynamic images, and the improvement is improved. security of encrypted images.
  • Fig. 5 is a flowchart of an image boundary method according to an exemplary embodiment.
  • the method shown in FIG. 5 can be applied to, for example, the server side of the above-mentioned system, and can also be applied to the terminal device of the above-mentioned system.
  • the method 50 provided by this embodiment of the present application may include the following steps.
  • step S502 binarization processing is performed on the color index image of each frame of carrier image to obtain a binary image of each frame of carrier image.
  • step S504 the boundary information of the binary image of each frame of carrier image is extracted, and the boundary information value of each pixel of each frame of carrier image is obtained.
  • steganography is performed at the outline of the image, which improves the visual effect of the dense animated expression and improves the security of steganography.
  • FIG. 6 is a frame diagram of an animation expression steganography method shown in FIGS. 2 to 5 .
  • first decompose (S602) the animated expression 6002 into multiple frames of color index images 6004, and embed secret information for each frame of images according to the designed information embedding method (S604) to obtain multiple images with hidden secret information.
  • S604 the designed information embedding method
  • a plurality of frames are combined (S606) and output as an animation image to obtain an animation expression with secret information hidden.
  • FIG. 7 is a schematic diagram of a steganographic process of each frame of images shown in FIGS. 2 to 6 .
  • the image 7002 used to hide the secret information in the current frame first reorder the read palette according to the sum of the squares of the RGB three-channel values to generate a new palette (S702), and generate a corresponding palette A new index matrix for the new palette (S704).
  • the current color index image is binarized to generate a binary image (S706), and then the boundary information of the binary image is extracted (S708), and the boundary information is used to define a distortion cost function.
  • the color index map 7002 of the current frame and the color index map 7004 of the previous frame in which secret information has been hidden are both converted into grayscale images (S7102, S7104), which are also used to define the distortion cost function.
  • the grayscale images of the current frame and the previous frame, and the new palette and index matrix of the current frame define a distortion cost function, calculate the distortion cost function value of each pixel (S712), and The calculated distortion cost function value, index matrix and secret information 7006 are sent to the STC coding framework (S714), and the secret image 7008 can be obtained.
  • FIG. 8 is a set of example diagrams of experimental results of performing STC coding steganography on multiple animation expressions according to the dynamic image steganography method shown in FIG. 2 to FIG. 6 .
  • Figure 8(a) to (i) it can be seen from the comparison between the original image and the corresponding secret images with steganographic 600-bit and 1100-bit secret information respectively, the visual effect of the image with the secret information hidden Good, the existence of information cannot be seen by the naked eye, and there is no obvious visual difference between dense images under different embedding rates, which shows that the experimental effect of this method is good.
  • FIG. 9 is a comparison of the two-dimensional image of the distortion cost value of the image calculated according to the dynamic image steganography method shown in FIG. 2 to FIG. 6 and the method of the prior art.
  • the pixel modification of each channel is not considered separately when calculating the distortion cost.
  • (a) is the original carrier image
  • (b) is the image boundary information
  • (c) is the pixel+1 distortion cost value calculated by the method of the application
  • (d) is the pixel-calculated by the method of the application Distortion cost value of 1,
  • the distribution of the distortion cost value calculated by the method of the present application is obviously different from the distribution of the distortion cost value calculated by the prior art method, the two-dimensional image of the distortion cost value of the method of the present application and the original image are extracted.
  • the contour boundary information is similar, and the distortion cost calculated according to the prior art method is smaller in the large-area coloring area, and larger in other areas.
  • the prior art method preferentially modifies the large-area coloring area when embedding information.
  • the characteristics of animation expressions the color information of the animation image is rich in the outline and the colors are similar, and the other large-area coloring areas are a single color, which is not suitable for modification. It can be seen that the distortion cost function proposed by the method of the present application fits well with the characteristics of animation images, and information is preferentially embedded in the contour area of the expression image.
  • the following table shows the comparative experimental data between the method of the present application and the method of the prior art, and the test errors of the two methods under the condition of 6 different embedding amounts are shown in the table. It can be seen that when the Subtractive Pixel Adjacency Matrix (SPAM) feature and embedded information are 600 bits (bit), the PE value of the distortion cost function proposed by the formula (6) of the present application is higher than that of the prior art. improved by 14.97%; the PE value increased by 9.09% in the spatial domain model (Spatial Rich Model, SRMQ1) feature and 600bit.
  • SAM Subtractive Pixel Adjacency Matrix
  • the distortion cost function proposed in the formula (6) of the present application is 12.85% higher than the PE value of the prior art method; the PE value of this method is increased by 4.86 under the SRMQ1 feature and 1100 bits. %.
  • Figures 10 and 11 plot the data in the above table, and show the comparison of the test errors between the method of the present application and the prior art under the SPAM and SRMQ1 features, respectively. It can be seen intuitively that the test errors of the two methods increase with the embedded At the same time, the PE value of the method proposed in the present application is much higher than that of the prior art regardless of the embedding rate.
  • Fig. 12 is a block diagram of a dynamic image steganography device according to an exemplary embodiment.
  • the apparatus shown in FIG. 12 can be applied to, for example, the server side of the above-mentioned system, and can also be applied to the terminal device of the above-mentioned system.
  • the dynamic image steganography apparatus 120 may include an index image obtaining module 1202 , an index value modification module 1204 , a first pixel value obtaining module 1206 , a second pixel value obtaining module 1208 , and a distortion cost obtaining module 1210 , a steganographic index matrix obtaining module 1212 and a steganographic image obtaining module 1214 .
  • the index image obtaining module 1202 can be used to obtain a color index image of each frame of the carrier image in the multi-frame carrier image, and the multi-frame carrier image is obtained from a dynamic image, and the color index image includes an index matrix and a color palette.
  • the index value modification module 1204 may be configured to modify each value in the index matrix to obtain a modified index matrix.
  • the first pixel value obtaining module 1206 may be configured to index the palette according to the index matrix to obtain the pixel value of each channel of each frame of carrier image.
  • the second pixel value obtaining module 1208 may be configured to index the palette according to the modified index matrix to obtain the modified pixel value of each channel of each frame of carrier image.
  • the distortion cost obtaining module 1210 may be configured to obtain a distortion cost matrix of each frame of carrier image according to the pixel value of each channel of each frame of carrier image and the modified pixel value of each frame of carrier image.
  • the steganographic index matrix obtaining module 1212 can be configured to embed the information to be steganographic into the index matrix based on the distortion cost matrix of the carrier image of each frame, and obtain the steganographic index matrix of the carrier image of each frame.
  • the steganographic image obtaining module 1214 can be configured to obtain multiple frames of steganographic images according to the steganographic index matrix of each frame of carrier image and the palette of each frame of carrier image, so as to synthesize dynamic steganographic images.
  • Fig. 13 is a block diagram of a dynamic image steganography device according to an exemplary embodiment.
  • the apparatus shown in FIG. 13 can be applied to, for example, the server side of the above-mentioned system, and can also be applied to the terminal device of the above-mentioned system.
  • the dynamic image steganography device 130 may include an index image obtaining module 1302, a current carrier image obtaining module 13032, a previous frame carrier image obtaining module 13034, a grayscale conversion module 13036, and an index value modification module 1304, binarization processing module 13052, boundary extraction module 13054, true boundary value acquisition module 13056, preset distortion value acquisition module 13058, first pixel value acquisition module 1306, second pixel value acquisition module 1308, high-pass filter module 13092, A channel distortion cost calculation module 13094, a distortion cost acquisition module 1310, a steganographic index matrix acquisition module 1312, and a steganographic image acquisition module 1314, wherein the index image acquisition module 1302 may include an initial index image acquisition module 13022, a palette update module 13024 and the index matrix update module 13026, the distortion cost obtaining module 1310 may include a pixel difference module 13102, an image distortion cost calculation module 13104, a pixel change calculation module 13106, a distortion cost value calculation module 13108, a
  • the index image obtaining module 1302 can be used to obtain a color index image of each frame of the carrier image in the multi-frame carrier image, and the multi-frame carrier image is obtained from a dynamic image, and the color index image includes an index matrix and a color palette.
  • the initial index image obtaining module 13022 can be used to obtain the initial index matrix and initial color palette of each frame of carrier image.
  • the current carrier image obtaining module 13032 can be configured to acquire the color index image of the carrier image of the current frame, where the carrier image of the current frame is any frame after the carrier image of the first frame of the carrier images of the multiple frames.
  • the previous frame carrier image obtaining module 13034 may be configured to acquire the color index image of the previous frame carrier image of the current frame carrier image.
  • the grayscale conversion module 13036 can be used to perform grayscale conversion on the color index image of the carrier image of the current frame to obtain the grayscale image of the carrier image of the current frame; perform grayscale conversion on the color index image of the steganographic image of the previous frame to obtain the previous frame. Grayscale image of the frame vector image.
  • the palette updating module 13024 may be configured to reorder the initial palettes of the carrier images of each frame according to the sum of the squares of the values of each channel to obtain the palette of the carrier images of each frame.
  • the index matrix updating module 13026 may be configured to obtain the index matrix of each frame carrier image according to the initial index matrix, the initial palette, and the palette of each frame carrier image.
  • the index value modification module 1304 may be configured to modify each value in the index matrix to obtain a modified index matrix.
  • the binarization processing module 13052 can be used to perform binarization processing on the color index images of the carrier images of each frame to obtain the binary images of the carrier images of each frame.
  • the boundary extraction module 13054 can be used to extract the boundary information of the binary image of each frame of carrier image, and obtain the boundary information value of each pixel of each frame of carrier image.
  • the true boundary value acquisition module 13056 may be used to obtain the true boundary value.
  • the preset distortion value obtaining module 13058 can be used to obtain the preset distortion value.
  • the first pixel value obtaining module 1306 may be configured to index the palette according to the index matrix to obtain the pixel value of each channel of each frame of carrier image.
  • the second pixel value obtaining module 1308 may be configured to index the palette according to the modified index matrix to obtain the modified pixel value of each channel of each frame of carrier image.
  • the high-pass filtering module 13092 can be used to filter the pixels of each channel with a high-pass filter for each channel of the carrier image of each frame, and then obtain the absolute value of the filtering result.
  • the channel distortion cost calculation module 13094 can be configured to use a low-pass filter to smooth the absolute value of the filtering result to obtain the final residual, and then take the reciprocal to obtain the distortion cost value of each channel of each frame of carrier image.
  • the distortion cost obtaining module 1310 may be configured to obtain a distortion cost matrix of each frame of carrier image according to the pixel value of each channel of each frame of carrier image and the modified pixel value of each frame of carrier image.
  • the pixel difference module 13102 can be used to obtain the difference between the pixel value of each channel of the carrier image of each frame and the modified pixel value.
  • the image distortion cost calculation module 13104 may be configured to obtain a distortion cost matrix of each frame of carrier image according to the difference between the pixel value of each channel of each frame of carrier image and the modified pixel value and the distortion cost value of each channel of each frame of carrier image.
  • the pixel change calculation module 13106 can be used to obtain the sum of squares of the difference between the pixel value of each channel of the carrier image of each frame and the difference of the modified pixel value.
  • the distortion cost value calculation module 13108 may be configured to average the distortion cost values of each channel of each frame of carrier image to obtain the total distortion cost value of each frame of carrier image.
  • the distortion cost matrix calculation module 13110 can be configured to multiply the total distortion cost value of each frame of carrier image and the sum of squares of the difference between the pixel value of each channel and the modified pixel value to obtain the distortion cost matrix of each frame of carrier image.
  • the luminance variation calculation module 13112 can be used to square the difference between the grayscale image of the carrier image of the current frame and the grayscale image of the carrier image of the previous frame to obtain the luminance variation of each pixel in the carrier image of the current frame.
  • the brightness change threshold obtaining module 13114 may be used to obtain the brightness change threshold.
  • the distortion cost matrix calculation module 13110 can also be used to calculate the difference between the total distortion cost value of the current frame carrier image and the pixel value of each channel of the pixel and the modified pixel value when the luminance variation of a pixel in the current frame carrier image is greater than the luminance variation threshold. Multiply the sum of the squares of the differences to obtain the color change amount of the pixel to obtain the distortion cost matrix of each frame of the carrier image.
  • the distortion cost weight obtaining module 13116 can be used to obtain the distortion cost weight, and the distortion cost weight is a value greater than 1.
  • the distortion cost matrix calculation module 13110 can also be used to calculate the total distortion cost value of the current frame carrier image and the pixel value of each channel of the pixel and the modified pixel value when the luminance variation of a pixel in the current frame carrier image is not greater than the luminance variation threshold. Multiply the squared sum of the difference and then multiply it by the distortion cost weight to obtain the color change amount of the pixel to obtain the distortion cost matrix of each frame of carrier image.
  • the distortion cost matrix calculation module 13110 can also be used to obtain the distortion cost of the pixel according to the pixel value of each channel of the pixel and the modified pixel value when the boundary information value of the pixel is equal to the true boundary value for each pixel of each frame of the carrier image. , to obtain the distortion cost matrix of each frame carrier image.
  • the distortion cost matrix calculation module 13110 can also be used for each pixel of each frame of the carrier image, when the boundary information value of the pixel is not equal to the true boundary value, the distortion cost of the pixel is obtained as the preset distortion value, so as to obtain each frame of the carrier image.
  • the steganographic index matrix obtaining module 1312 can be configured to embed the information to be steganographic into the index matrix based on the distortion cost matrix of the carrier image of each frame, and obtain the steganographic index matrix of the carrier image of each frame.
  • the steganographic image obtaining module 1314 can be configured to obtain multiple frames of steganographic images according to the steganographic index matrix of each frame of carrier image and the palette of each frame of carrier image, so as to synthesize dynamic steganographic images.
  • FIG. 14 shows a schematic structural diagram of an electronic device in an embodiment of the present application. It should be noted that the device shown in FIG. 14 is only an example of a computer system, and should not impose any limitations on the functions and scope of use of the embodiments of the present application.
  • the apparatus 1400 includes a central processing unit (CPU) 1401, which can be processed according to a program stored in a read only memory (ROM) 1402 or a program loaded into a random access memory (RAM) 1403 from a storage section 1408 Various appropriate actions and processes are performed.
  • ROM read only memory
  • RAM random access memory
  • various programs and data required for the operation of the device 1400 are also stored.
  • the CPU 1401, the ROM 1402, and the RAM 1403 are connected to each other through a bus 1404.
  • An input/output (I/O) interface 1405 is also connected to bus 1404 .
  • the following components are connected to the I/O interface 1405: an input section 1406 including a keyboard, a mouse, etc.; an output section 1407 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1408 including a hard disk, etc. ; and a communication section 1409 including a network interface card such as a LAN card, a modem, and the like.
  • the communication section 1409 performs communication processing via a network such as the Internet.
  • Drivers 1414 are also connected to I/O interface 1405 as needed.
  • a removable medium 1411 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is mounted on the drive 1414 as needed so that a computer program read therefrom is installed into the storage section 1408 as needed.
  • embodiments of the present application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the method illustrated in the flowchart.
  • the computer program may be downloaded and installed from the network via the communication portion 1409, and/or installed from the removable medium 1411.
  • CPU central processing unit
  • the computer-readable medium shown in this application may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the above two.
  • the computer readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any combination of the above. More specific examples of computer readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable Programmable read only memory (EPROM or flash memory), fiber optics, portable compact disk read only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
  • a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code therein. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • a computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device .
  • Program code embodied on a computer readable medium may be transmitted using any suitable medium including, but not limited to, wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
  • each block in the flowchart or block diagrams may represent a module, segment, or portion of code that contains one or more logical functions for implementing the specified functions executable instructions.
  • the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved.
  • the modules involved in the embodiments of the present application may be implemented in a software manner, and may also be implemented in a hardware manner.
  • the described module can also be set in the processor, for example, it can be described as: a processor includes an index image obtaining module, an index value modification module, a first pixel value obtaining module, a second pixel value obtaining module, and a distortion cost obtaining module.
  • module, steganographic index matrix obtaining module and steganographic image obtaining module are examples of these modules do not constitute a limitation of the module itself under certain circumstances.
  • the index image acquisition module can also be described as "a module for obtaining color index images of multiple frames of carrier images from dynamic carrier images”. .
  • the present application also provides a computer-readable medium.
  • the computer-readable medium may be included in the device described in the above embodiments, or may exist alone without being assembled into the device.
  • the above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by a device, the device includes:
  • the multi-frame carrier image is obtained from the dynamic image, and the color index image includes an index matrix and a palette; modify each value in the index matrix to obtain a modified index matrix ;
  • the index matrix index palette obtain the pixel value of each channel of each frame carrier image;
  • the modified index matrix index palette obtain the modified pixel value of each channel of each frame carrier image;
  • each frame carrier image The pixel value of the channel and the modified pixel value of each channel of the carrier image of each frame obtain the distortion cost matrix of the carrier image of each frame; based on the distortion cost matrix of the carrier image of each frame, the information to be steganographic is embedded in the index matrix to obtain the carrier image of each frame.
  • Steganographic index matrix according to the steganographic index matrix of each frame of carrier image and the palette of each frame of carrier image, multiple frames of steganographic images are obtained to synthesize dynamic steganographic images.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Health & Medical Sciences (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Image Processing (AREA)

Abstract

Provided in the present application are a method for dynamic image steganography, an apparatus, a device, and a storage medium. The method comprises: obtaining a color indexed image, comprising an index matrix and a palette, of each carrier image among a plurality of carrier images acquired from a dynamic image; modifying each value in the index matrices, and obtaining modified index matrices; indexing the palettes according to the index matrices, and obtaining pixel values of each channel of each carrier image; indexing the palettes according to the modified index matrices, and obtaining modified pixel values of each channel of each carrier image; obtaining a distortion cost matrix for each carrier image according to the pixel values of each channel of each carrier image and the modified pixel values of each channel of each carrier image; embedding information to be steganographically concealed into the index matrices on the basis of the distortion cost matrix for each carrier image, and obtaining a steganographic index matrix for each carrier image; and obtaining a plurality of steganographic images according to the steganographic index matrix for each carrier image and the palette of each carrier image, so as to be combined and form a dynamic steganographic image.

Description

动态图像隐写方法、装置、设备及存储介质Dynamic image steganography method, device, device and storage medium
本申请要求在2021年3月23日提交中国专利局、申请号为202110309029.8、发明名称为“动态图像隐写方法、装置、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202110309029.8 and the invention titled "Dynamic Image Steganography Method, Apparatus, Equipment and Storage Medium" filed with the China Patent Office on March 23, 2021, the entire contents of which are by reference Incorporated in this application.
技术领域technical field
本申请涉及信息安全技术领域,具体而言,涉及一种动态图像隐写方法、装置、设备及可读存储介质。The present application relates to the technical field of information security, and in particular, to a dynamic image steganography method, apparatus, device, and readable storage medium.
背景技术Background technique
隐写技术是信息隐藏技术领域的重要分支,可通过将秘密消息嵌入到图像、音频、视频、文本等文件中达到隐蔽通信的目的。图像具有普遍性、易获取性和冗余数据充足等特点,以其为信息隐藏载体的图像隐写技术是本领域的研究重点之一。相关技术中的图像隐写方法是在静态图像上提出的,且都仅适用于真彩图像,还未有基于动态索引图像的隐写方法。Steganography is an important branch in the field of information hiding technology, which can achieve the purpose of covert communication by embedding secret messages into images, audio, video, text and other files. Image has the characteristics of universality, easy access and sufficient redundant data. Image steganography technology using it as the information hiding carrier is one of the research focuses in this field. Image steganography methods in the related art are proposed on static images, and are only applicable to true-color images, and there is no steganography method based on dynamic index images.
如上所述,如何提供基于动态索引图像的隐写方法成为亟待解决的问题。As mentioned above, how to provide a steganography method based on dynamic index images has become an urgent problem to be solved.
在所述背景技术部分公开的上述信息仅用于加强对本申请的背景的理解,因此它可以包括不构成对本领域普通技术人员已知的现有技术的信息。The above information disclosed in this Background section is only for enhancement of understanding of the background of the application and therefore it may contain information that does not form the prior art that is already known to a person of ordinary skill in the art.
发明内容SUMMARY OF THE INVENTION
本申请的目的在于提供一种动态图像隐写方法、装置、设备及可读存储介质,至少在一定程度上克服相关技术中静态图像的隐写方法不适用于动态索引图像的问题。The purpose of the present application is to provide a dynamic image steganography method, device, device and readable storage medium, at least to a certain extent, to overcome the problem that the static image steganography method in the related art is not suitable for dynamic index images.
本申请的其他特性和优点将通过下面的详细描述变得显然,或部分地通过本申请的实践而习得。Other features and advantages of the present application will become apparent from the following detailed description, or be learned in part by practice of the present application.
根据本申请的一方面,提供一种动态图像隐写方法,包括:获得多帧载体图像中各帧载体图像的彩色索引图像,所述多帧载体图像从所述动态图像中获得,所述彩色索引图像包括索引矩阵和调色板;对所述索引矩阵中的各个值进行修改,获得修改索引矩阵;根据所述索引矩阵索引所述调色板,获得各帧载体图像的各通道的像素值;根据所述修改索引矩阵索引所述调色板,获得各帧载体图像的各通道的修改像素值;根据所述各帧载体图像的各通道的像素值和所述各帧载体图像的各通道的修改像素值获得各帧载体图像的失真代价矩阵;基于所述各帧载体图像的失真代价矩阵将待隐写信息嵌入所述索引矩阵,获得各帧载体图像的隐写索引矩阵;根据所述各帧载体图像的隐写索引矩阵和所述各帧载体图像的调色板获得多帧隐写图像,以合成动态隐写图像。According to an aspect of the present application, a dynamic image steganography method is provided, comprising: obtaining a color index image of each frame of carrier images in a multi-frame carrier image, wherein the multi-frame carrier images are obtained from the dynamic image, the color The index image includes an index matrix and a palette; modify each value in the index matrix to obtain a modified index matrix; index the palette according to the index matrix to obtain the pixel value of each channel of each frame of carrier image ; Index the palette according to the modified index matrix to obtain the modified pixel value of each channel of each frame carrier image; According to the pixel value of each channel of the each frame carrier image and each channel of the each frame carrier image Obtain the distortion cost matrix of each frame carrier image based on the modified pixel values of The steganographic index matrix of each frame of carrier image and the palette of each frame of carrier image are used to obtain multiple frames of steganographic images to synthesize dynamic steganographic images.
根据本申请的一实施例,所述方法还包括:对于各帧载体图像的各通道,采用高通滤波器对各通道像素进行滤波后取滤波结果的绝对值;采用低通滤波器对所述滤波结果的绝对值进行平滑获得最终残差后取倒数,分别获得各帧载体图像的各通道的失真代价值;所述根据所述各帧载体图像的各通道的像素值和所述各帧载体图像的各通道的修改像素值获得各帧载体图像的失真代价矩阵包括:分别获得各帧载体图像的各通道的像素值与修改像素值的差;根据所述各帧载体图像的各通道的像素值与修改像素值的差以及所述各帧载体图像的各通道的失真代价值获得所述各帧载体图像的失真代价矩阵。According to an embodiment of the present application, the method further includes: for each channel of each frame of the carrier image, using a high-pass filter to filter the pixels of each channel and then obtaining the absolute value of the filtering result; using a low-pass filter to filter the The absolute value of the result is smoothed to obtain the reciprocal of the final residual, and the distortion cost value of each channel of each frame of carrier image is obtained respectively; Obtaining the distortion cost matrix of each frame carrier image by modifying the pixel value of each channel includes: respectively obtaining the difference between the pixel value of each channel of each frame carrier image and the modified pixel value; The distortion cost matrix of each frame carrier image is obtained from the difference with the modified pixel value and the distortion cost value of each channel of each frame carrier image.
根据本申请的一实施例,所述获得多帧载体图像中各帧载体图像的彩色索引图像包括:获取各帧载体图像的初始索引矩阵和初始调色板;将所述各帧载体图像的初始调色板按照各通道值的平方和重新排序,获得各帧载体图像的调色板;根据各帧载体图像的初始索引矩阵、初始调色板、以及调色板获得各帧载体图像的索引矩阵;所述根据所述个帧载体图像的各通道的像素值与修改像素值的差以及所述各帧载体图像的各通道的失真代价值获得所述各帧载体图像的失真代价矩阵包括:获得所述各帧载体图像的各通道的像素值与修改像素值的差的平方和;对所述各帧载体图像的各通道的失真代价值求平均获得各帧载体图像的总失真代价值;将所述各帧载体图像的总失真代价值与各通道的像素值与修改像素值的差的平方和相乘,获得所述各帧载体图像的失真代价矩阵。According to an embodiment of the present application, the obtaining a color index image of each frame of carrier images in the multi-frame carrier images includes: acquiring an initial index matrix and an initial palette of each frame of carrier images; The palette is reordered according to the squared sum of each channel value to obtain the palette of each frame of carrier image; the index matrix of each frame of carrier image is obtained according to the initial index matrix of each frame of carrier image, the initial palette, and the palette ; Described obtaining the distortion cost matrix of each frame carrier image according to the difference between the pixel value of each channel of the frame carrier image and the modified pixel value and the distortion cost value of each channel of the each frame carrier image includes: obtaining: The square sum of the difference between the pixel value of each channel of the each frame carrier image and the modified pixel value; averaging the distortion cost value of each channel of the each frame carrier image to obtain the total distortion cost value of each frame carrier image; The total distortion cost value of each frame of carrier image is multiplied by the square sum of the difference between the pixel value of each channel and the modified pixel value to obtain a distortion cost matrix of each frame of carrier image.
根据本申请的一实施例,所述方法还包括:获取当前帧载体图像的彩色索引图像,所述当前帧载体图像为所述多帧载体图像中第一帧载体图像之后的任意一帧;对当前帧载体图像的彩色索引图像进行灰度转换,获得当前帧载体图像的灰度图;获取所述当前帧载体图像的前一帧载体图像的彩色索引图像;对前一帧隐写图像的彩色索引图像进行灰度转换,获得前一帧载体图像的灰度图;所述将所述各帧载体图像的总失真代价值与各通道的像素值与修改像素值的差的平方和相乘,获得所述各帧载体图像的失真代价矩阵包括:将所述当前帧载体图像的灰度图与所述前一帧载体图像的灰度图作差后求平方,获得当前帧载体图像中各像素的亮度变化量;获得亮度变化阈值;在所述当前帧载体图像中一像素的亮度变化量大于所述亮度变化阈值时,将所述当前帧载体图像的总失真代价值与该像素各通道的像素值与修改像素值的差的平方和相乘,获得该像素的颜色改变量,以获得所述各帧载体图像的失真代价矩阵。According to an embodiment of the present application, the method further includes: acquiring a color index image of a carrier image of a current frame, where the carrier image of the current frame is any frame after the carrier image of the first frame in the multi-frame carrier images; Perform grayscale conversion on the color index image of the carrier image of the current frame to obtain the grayscale image of the carrier image of the current frame; obtain the color index image of the carrier image of the previous frame of the carrier image of the current frame; The index image is converted into grayscale to obtain the grayscale image of the previous frame of the carrier image; the total distortion cost value of each frame of the carrier image is multiplied by the sum of the squares of the difference between the pixel value of each channel and the modified pixel value, Obtaining the distortion cost matrix of the carrier image of each frame includes: squaring the grayscale image of the carrier image of the current frame and the grayscale image of the carrier image of the previous frame, and obtaining each pixel in the carrier image of the current frame. When the luminance variation of a pixel in the current frame carrier image is greater than the luminance variation threshold, compare the total distortion cost value of the current frame carrier image with the value of each channel of the pixel The pixel value is multiplied by the square sum of the difference of the modified pixel value to obtain the color change amount of the pixel, so as to obtain the distortion cost matrix of the carrier image of each frame.
根据本申请的一实施例,所述将所述各帧载体图像的总失真代价值与各通道的像素值与修改 像素值的差的平方和相乘,获得所述各帧载体图像的失真代价矩阵包括:获得亮度变化阈值;获得失真代价权重,所述失真代价权重为大于1的值;在所述当前帧载体图像中一像素的亮度变化量不大于所述亮度变化阈值时,将所述当前帧载体图像的总失真代价值与该像素各通道的像素值与修改像素值的差的平方和相乘后再乘以所述失真代价权重,获得该像素的颜色改变量,以获得所述各帧载体图像的失真代价矩阵。According to an embodiment of the present application, the total distortion cost of each frame of carrier image is multiplied by the sum of the squares of the difference between the pixel value of each channel and the modified pixel value to obtain the distortion cost of each frame of carrier image The matrix includes: obtaining a brightness change threshold; obtaining a distortion cost weight, where the distortion cost weight is a value greater than 1; when the brightness change of a pixel in the current frame carrier image is not greater than the brightness change threshold, the The total distortion cost value of the carrier image of the current frame is multiplied by the square sum of the difference between the pixel value of each channel of the pixel and the modified pixel value, and then multiplied by the distortion cost weight to obtain the color change amount of the pixel to obtain the Distortion cost matrix for each frame of carrier image.
根据本申请的一实施例,所述方法还包括:对所述各帧载体图像的彩色索引图像进行二值化处理,获得各帧载体图像的二值图像;提取所述各帧载体图像的二值图像的边界信息,获得各帧载体图像的各像素的边界信息值;获取真边界值;所述根据所述各帧载体图像的各通道的像素值和所述各帧载体图像的各通道的修改像素值获得各帧载体图像的失真代价矩阵包括:对于各帧载体图像的各像素,在该像素的边界信息值等于所述真边界值时,根据该像素的各通道的像素值和修改像素值获得该像素的失真代价,以获得所述各帧载体图像的失真代价矩阵。According to an embodiment of the present application, the method further includes: performing a binarization process on the color index images of the carrier images of each frame to obtain a binary image of the carrier images of each frame; extracting the binary images of the carrier images of each frame The boundary information of the value image, obtain the boundary information value of each pixel of each frame carrier image; obtain the true boundary value; according to the pixel value of each channel of each frame carrier image and the pixel value of each channel of each frame carrier image and the frame carrier image Modifying the pixel value to obtain the distortion cost matrix of the carrier image of each frame includes: for each pixel of the carrier image of each frame, when the boundary information value of the pixel is equal to the true boundary value, according to the pixel value of each channel of the pixel and the modified pixel value to obtain the distortion cost of this pixel to obtain the distortion cost matrix of the carrier image of each frame.
根据本申请的一实施例,所述方法还包括:获取预设失真值;所述根据所述各帧载体图像的各通道的像素值和所述各帧载体图像的各通道的修改像素值获得各帧载体图像的失真代价矩阵还包括:对于各帧载体图像的各像素,在该像素的边界信息值不等于所述真边界值时,获得该像素的失真代价为所述预设失真值,以获得所述各帧载体图像的失真代价矩阵。According to an embodiment of the present application, the method further includes: obtaining a preset distortion value; obtaining the pixel value according to the pixel value of each channel of the carrier image of each frame and the modified pixel value of each channel of the carrier image of each frame The distortion cost matrix of each frame of carrier image further includes: for each pixel of each frame of carrier image, when the boundary information value of the pixel is not equal to the true boundary value, the obtained distortion cost of the pixel is the preset distortion value, to obtain the distortion cost matrix of the carrier image of each frame.
根据本申请的再一方面,提供一种动态图像隐写装置,包括:索引图像获得模块,用于获得多帧载体图像中各帧载体图像的彩色索引图像,所述多帧载体图像从所述动态图像中获得,所述彩色索引图像包括索引矩阵和调色板;索引值修改模块,用于对所述索引矩阵中的各个值进行修改,获得修改索引矩阵;第一像素值获得模块,用于根据所述索引矩阵索引所述调色板,获得各帧载体图像的各通道的像素值;第二像素值获得模块,用于根据所述修改索引矩阵索引所述调色板,获得各帧载体图像的各通道的修改像素值;失真代价获得模块,用于根据所述各帧载体图像的各通道的像素值和所述各帧载体图像的各通道的修改像素值获得各帧载体图像的失真代价矩阵;隐写索引矩阵获得模块,用于基于所述各帧载体图像的失真代价矩阵将待隐写信息嵌入所述索引矩阵,获得各帧载体图像的隐写索引矩阵;隐写图像获得模块,用于根据所述各帧载体图像的隐写索引矩阵和所述各帧载体图像的调色板获得多帧隐写图像,以合成动态隐写图像。According to yet another aspect of the present application, there is provided a dynamic image steganography device, comprising: an index image obtaining module configured to obtain a color index image of each frame of carrier images in a multi-frame carrier image, the multi-frame carrier images from the Obtained from a dynamic image, the color index image includes an index matrix and a palette; an index value modification module is used to modify each value in the index matrix to obtain a modified index matrix; the first pixel value obtaining module, using indexing the palette according to the index matrix to obtain pixel values of each channel of the carrier image of each frame; a second pixel value obtaining module for indexing the palette according to the modified index matrix to obtain each frame The modified pixel value of each channel of the carrier image; the distortion cost obtaining module is used to obtain the pixel value of each frame of the carrier image according to the pixel value of each channel of the carrier image of each frame and the modified pixel value of each channel of the carrier image of each frame. Distortion cost matrix; a steganographic index matrix obtaining module, used for embedding the information to be steganographic into the index matrix based on the distortion cost matrix of each frame of carrier image, to obtain the steganographic index matrix of each frame of carrier image; steganographic image acquisition The module is configured to obtain multiple frames of steganographic images according to the steganographic index matrix of the carrier images of each frame and the palette of the carrier images of each frame, so as to synthesize dynamic steganographic images.
根据本申请的一实施例,所述装置还包括:高通滤波模块,用于对于各帧载体图像的各通道,采用高通滤波器对各通道像素进行滤波后取滤波结果的绝对值;通道失真代价计算模块,用于采用低通滤波器对所述滤波结果的绝对值进行平滑获得最终残差后取倒数,分别获得各帧载体图像的各通道的失真代价值;所述失真代价获得模块包括:像素作差模块,用于分别获得各帧载体图像的各通道的像素值与修改像素值的差;图像失真代价计算模块,用于根据所述各帧载体图像的各通道的像素值与修改像素值的差以及所述各帧载体图像的各通道的失真代价值获得所述各帧载体图像的失真代价矩阵。According to an embodiment of the present application, the device further includes: a high-pass filtering module, configured to filter the pixels of each channel with a high-pass filter for each channel of each frame of the carrier image, and then obtain the absolute value of the filtering result; the channel distortion cost The calculation module is used for smoothing the absolute value of the filtering result by using a low-pass filter to obtain the final residual and then taking the reciprocal to obtain the distortion cost value of each channel of each frame of carrier image; the distortion cost obtaining module includes: The pixel difference module is used to obtain the difference between the pixel value of each channel of each frame carrier image and the modified pixel value respectively; the image distortion cost calculation module is used to modify the pixel value according to the pixel value of each channel of each frame carrier image and the modified pixel value. The difference of the values and the distortion cost value of each channel of the carrier image of each frame obtains the distortion cost matrix of the carrier image of each frame.
根据本申请的一实施例,所述索引图像获得模块包括:初始索引图像获得模块,用于获取各帧载体图像的初始索引矩阵和初始调色板;调色板更新模块,用于将所述各帧载体图像的初始调色板按照各通道值的平方和重新排序,获得各帧载体图像的调色板;索引矩阵更新模块,用于根据各帧载体图像的初始索引矩阵、初始调色板、以及调色板获得各帧载体图像的索引矩阵;所述失真代价获得模块包括:像素变化计算模块,用于获得所述各帧载体图像的各通道的像素值与修改像素值的差的平方和;失真代价值计算模块,用于对所述各帧载体图像的各通道的失真代价值求平均获得各帧载体图像的总失真代价值;失真代价矩阵计算模块,用于将所述各帧载体图像的总失真代价值与各通道的像素值与修改像素值的差的平方和相乘,获得所述各帧载体图像的失真代价矩阵。According to an embodiment of the present application, the index image obtaining module includes: an initial index image obtaining module for obtaining an initial index matrix and an initial palette of each frame of carrier images; a palette updating module for converting the The initial palette of each frame carrier image is reordered according to the square sum of each channel value to obtain the palette of each frame carrier image; the index matrix update module is used for the initial index matrix and initial palette according to the initial index matrix and initial palette of each frame carrier image. , and the index matrix that palette obtains each frame carrier image; Described distortion cost obtaining module comprises: pixel change calculation module, for obtaining the square of the difference of the pixel value of each channel of described each frame carrier image and the modification pixel value And; Distortion cost value calculation module, for averaging the distortion cost value of each channel of each frame carrier image to obtain the total distortion cost value of each frame carrier image; Distortion cost matrix calculation module, for describing each frame The total distortion cost value of the carrier image is multiplied by the square sum of the difference between the pixel value of each channel and the modified pixel value to obtain the distortion cost matrix of the carrier image of each frame.
根据本申请的一实施例,所述装置还包括:当前载体图像获得模块,用于获取当前帧载体图像的彩色索引图像,所述当前帧载体图像为所述多帧载体图像中第一帧载体图像之后的任意一帧;灰度转换模块,用于对当前帧载体图像的彩色索引图像进行灰度转换,获得当前帧载体图像的灰度图;前一帧载体图像获得模块,用于获取所述当前帧载体图像的前一帧载体图像的彩色索引图像;灰度转换模块,还用于对前一帧隐写图像的彩色索引图像进行灰度转换,获得前一帧载体图像的灰度图;所述失真代价矩阵计算模块包括:亮度变化量计算模块,用于将所述当前帧载体图像的灰度图与所述前一帧载体图像的灰度图作差后求平方,获得当前帧载体图像中各像素的亮度变化量;亮度变化阈值获得模块,用于获得亮度变化阈值;所述失真代价矩阵计算模块还用于在所述当前帧载体图像中一像素的亮度变化量大于所述亮度变化阈值时,将所述当前帧载体图像的总失真代价值与该像素各通道的像素值与修改像素值的差的平方和相乘,获得该像素的颜色改变量,以获得所述各帧载体图像的失真代价矩阵。According to an embodiment of the present application, the apparatus further includes: a current carrier image obtaining module, configured to acquire a color index image of the current frame carrier image, where the current frame carrier image is the first frame carrier in the multi-frame carrier images Any frame after the image; the grayscale conversion module is used to perform grayscale conversion on the color index image of the current frame carrier image to obtain the grayscale image of the current frame carrier image; the previous frame carrier image acquisition module is used to obtain all The color index image of the previous frame carrier image of the current frame carrier image; the grayscale conversion module is also used to perform grayscale conversion on the color index image of the previous frame steganographic image to obtain the grayscale image of the previous frame carrier image. ; Described distortion cost matrix calculation module comprises: brightness change amount calculation module, is used to square after the gray scale of described current frame carrier image and the gray scale of described previous frame carrier image are made difference, obtain current frame The brightness change amount of each pixel in the carrier image; the brightness change threshold value obtaining module is used to obtain the brightness change threshold value; the distortion cost matrix calculation module is also used for the brightness change amount of one pixel in the current frame When the brightness changes the threshold value, multiply the total distortion cost value of the carrier image of the current frame and the sum of the squares of the difference between the pixel value of each channel of the pixel and the modified pixel value to obtain the color change amount of the pixel to obtain the Distortion cost matrix for the frame carrier image.
根据本申请的一实施例,所述失真代价矩阵计算模块包括:亮度变化阈值获得模块,用于获得亮度变化阈值;失真代价权重获得模块,用于获得失真代价权重,所述失真代价权重为大于1的值;所述失真代价矩阵计算模块还用于在所述当前帧载体图像中一像素的亮度变化量不大于所述亮度变化阈值时,将所述当前帧载体图像的总失真代价值与该像素各通道的像素值与修改像素值的差的平方和相乘后再乘以所述失真代价权重,获得该像素的颜色改变量,以获得所述各帧载体图像的失真代价矩阵。According to an embodiment of the present application, the distortion cost matrix calculation module includes: a brightness change threshold obtaining module, used to obtain a brightness change threshold; a distortion cost weight obtaining module, used to obtain a distortion cost weight, where the distortion cost weight is greater than or equal to The value of 1; the distortion cost matrix calculation module is also used to compare the total distortion cost value of the current frame carrier image with the The square sum of the difference between the pixel value of each channel of the pixel and the modified pixel value is multiplied by the distortion cost weight to obtain the color change amount of the pixel, so as to obtain the distortion cost matrix of the carrier image of each frame.
根据本申请的一实施例,所述装置还包括:二值化处理模块,用于对所述各帧载体图像的彩色索引图像进行二值化处理,获得各帧载体图像的二值图像;边界提取模块,用于提取所述各帧载体图像的二值图像的边界信息,获得各帧载体图像的各像素的边界信息值;真边界值获取模块,用于获取真边界值;所述失真代价矩阵计算模块还用于:对于各帧载体图像的各像素,在该像素的边界信息值等于所述真边界值时,根据该像素的各通道的像素值和修改像素值获得该像素的失真代价,以获得所述各帧载体图像的失真代价矩阵。According to an embodiment of the present application, the apparatus further includes: a binarization processing module configured to perform binarization processing on the color index images of the carrier images of each frame to obtain a binary image of the carrier images of each frame; The extraction module is used to extract the boundary information of the binary images of the carrier images of each frame, and obtain the boundary information value of each pixel of the carrier image of each frame; the true boundary value acquisition module is used to obtain the true boundary value; the distortion cost The matrix calculation module is also used for: for each pixel of each frame of the carrier image, when the boundary information value of the pixel is equal to the true boundary value, obtain the distortion cost of the pixel according to the pixel value of each channel of the pixel and the modified pixel value , to obtain the distortion cost matrix of the carrier image of each frame.
根据本申请的一实施例,所述失真代价矩阵计算模块还包括:预设失真值获取模块,用于获取预设失真值;所述失真代价矩阵计算模块还用于:对于各帧载体图像的各像素,在该像素的边界信息值不等于所述真边界值时,获得该像素的失真代价为所述预设失真值,以获得所述各帧载体图像的失真代价矩阵。According to an embodiment of the present application, the distortion cost matrix calculation module further includes: a preset distortion value acquisition module for acquiring a preset distortion value; the distortion cost matrix calculation module is further used for: for each frame of the carrier image For each pixel, when the boundary information value of the pixel is not equal to the true boundary value, the obtained distortion cost of the pixel is the preset distortion value, so as to obtain the distortion cost matrix of the carrier image of each frame.
根据本申请的再一方面,提供一种设备,包括:存储器、处理器及存储在所述存储器中并可在所述处理器中运行的可执行指令,所述处理器执行所述可执行指令时实现如上述任一种方法。According to yet another aspect of the present application, there is provided an apparatus comprising: a memory, a processor, and executable instructions stored in the memory and executable in the processor, the processor executing the executable instructions When implementing any of the above methods.
根据本申请的再一方面,提供一种计算机可读存储介质,其上存储有计算机可执行指令,所述可执行指令被处理器执行时实现如上述任一种方法。According to yet another aspect of the present application, a computer-readable storage medium is provided on which computer-executable instructions are stored, and when the executable instructions are executed by a processor, any one of the above methods is implemented.
本申请的实施例提供的动态图像隐写方法,通过从动态图像中获得多帧载体图像中各帧载体图像的包括索引矩阵和调色板的彩色索引图像,对索引矩阵中的各个值进行修改获得修改索引矩阵后,根据索引矩阵索引调色板获得的各帧载体图像的各通道的像素值以及修改索引矩阵索引调色板获得的各帧载体图像的各通道的修改像素值获得各帧载体图像的失真代价矩阵,再基于各帧载体图像的失真代价矩阵将待隐写信息嵌入索引矩阵获得各帧载体图像的隐写索引矩阵,最后根据各帧载体图像的隐写索引矩阵和各帧载体图像的调色板获得多帧隐写图像,以合成动态隐写图像,从而可实现基于动态索引图像进行隐写。The dynamic image steganography method provided by the embodiments of the present application modifies each value in the index matrix by obtaining a color index image including an index matrix and a color palette of each frame of the carrier image in the multi-frame carrier image from the dynamic image. After the modified index matrix is obtained, each frame carrier is obtained according to the pixel value of each channel of each frame carrier image obtained by the index matrix index palette and the modified pixel value of each channel of each frame carrier image obtained by modifying the index matrix index palette. The distortion cost matrix of the image, and then based on the distortion cost matrix of the carrier image of each frame, the steganographic information is embedded in the index matrix to obtain the steganographic index matrix of the carrier image of each frame, and finally the steganographic index matrix of the carrier image of each frame and the carrier image of each frame are obtained. The palette of the image obtains multiple frames of steganographic images to synthesize dynamic steganographic images, so that steganography based on dynamic index images can be realized.
应当理解的是,以上的一般描述和后文的细节描述仅是示例性的,并不能限制本申请。It is to be understood that the foregoing general description and the following detailed description are exemplary only and do not limit the application.
附图说明Description of drawings
通过参照附图详细描述其示例实施例,本申请的上述和其它目标、特征及优点将变得更加显而易见。The above and other objects, features and advantages of the present application will become more apparent from the detailed description of example embodiments thereof with reference to the accompanying drawings.
图1示出本申请实施例中一种系统结构的示意图。FIG. 1 shows a schematic diagram of a system structure in an embodiment of the present application.
图2示出本申请实施例中一种动态图像隐写方法的流程图。FIG. 2 shows a flowchart of a dynamic image steganography method in an embodiment of the present application.
图3示出了图2中所示的步骤S202在一实施例中的处理过程示意图。FIG. 3 shows a schematic diagram of the processing procedure of step S202 shown in FIG. 2 in an embodiment.
图4是根据一示例性实施例示出的一种失真代价获得方法的流程图。Fig. 4 is a flowchart of a method for obtaining a distortion cost according to an exemplary embodiment.
图5是根据一示例性实施例示出的一种图像边界方法的流程图。Fig. 5 is a flowchart of an image boundary method according to an exemplary embodiment.
图6是根据图2至图5示出的一种动画表情隐写方法的框架图。FIG. 6 is a frame diagram of an animation expression steganography method shown in FIGS. 2 to 5 .
图7是根据图2至图6示出的一种各帧图像的隐写流程示意图。FIG. 7 is a schematic diagram of a steganographic process of each frame of images shown in FIGS. 2 to 6 .
图8是根据图2至图6示出的一种隐写实验的结果示例图。FIG. 8 is an example diagram of the results of a steganography experiment shown in FIGS. 2 to 6 .
图9是根据图2至图6示出的动态图像隐写方法与现有技术方法的失真代价对比示意图。FIG. 9 is a schematic diagram illustrating a comparison of distortion costs between the dynamic image steganography method shown in FIGS. 2 to 6 and the method in the prior art.
图10是根据图2至图6示出的动态图像隐写方法与现有技术方法的价对比示意图。FIG. 10 is a schematic diagram showing the comparison of prices between the dynamic image steganography method shown in FIGS. 2 to 6 and the prior art method.
图11是根据图2至图6示出的动态图像隐写方法与现有技术方法的失真代价对比示意图。FIG. 11 is a schematic diagram illustrating a comparison of distortion costs between the dynamic image steganography method shown in FIGS. 2 to 6 and the prior art method.
图12示出本申请实施例中一种动态图像隐写装置的框图。FIG. 12 shows a block diagram of a dynamic image steganography apparatus in an embodiment of the present application.
图13示出本申请实施例中另一种动态图像隐写装置的框图。FIG. 13 shows a block diagram of another dynamic image steganography apparatus in an embodiment of the present application.
图14示出本申请实施例中一种电子设备的结构示意图。FIG. 14 shows a schematic structural diagram of an electronic device in an embodiment of the present application.
具体实施方式Detailed ways
现在将参考附图更全面地描述示例实施例。然而,示例实施例能够以多种形式实施,且不应被理解为限于在此阐述的范例;相反,提供这些实施例使得本申请将更加全面和完整,并将示例实施例的构思全面地传达给本领域的技术人员。附图仅为本申请的示意性图解,并非一定是按比例绘制。图中相同的附图标记表示相同或类似的部分,因而将省略对它们的重复描述。Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments, however, can be embodied in various forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this application will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The drawings are merely schematic illustrations of the present application and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repeated descriptions will be omitted.
此外,所描述的特征、结构或特性可以以任何合适的方式结合在一个或更多实施例中。在下面的描述中,提供许多具体细节从而给出对本申请的实施例的充分理解。然而,本领域技术人员将意识到,可以实践本申请的技术方案而省略所述特定细节中的一个或更多,或者可以采用其它的方法、装置、步骤等。在其它情况下,不详细示出或描述公知结构、方法、装置、实现或者操作以避免喧宾夺主而使得本申请的各方面变得模糊。Furthermore, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided in order to give a thorough understanding of the embodiments of the present application. However, those skilled in the art will appreciate that the technical solutions of the present application may be practiced without one or more of the specific details, or other methods, devices, steps, etc. may be employed. In other instances, well-known structures, methods, devices, implementations, or operations have not been shown or described in detail to avoid obscuring aspects of the application.
此外,术语“第一”、“第二”等仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括一个或者更多个该特征。在本申请的描述中,“多个”的含义是至少两个,例如两个, 三个等,除非另有明确具体的限定。符号“/”一般表示前后关联对象是一种“或”的关系。In addition, the terms "first", "second", etc. are used for descriptive purposes only, and should not be construed as indicating or implying relative importance or implying the number of indicated technical features. Thus, a feature defined as "first" or "second" may expressly or implicitly include one or more of that feature. In the description of the present application, "plurality" means at least two, such as two, three, etc., unless expressly and specifically defined otherwise. The symbol "/" generally indicates that the related objects are an "or" relationship.
在本申请中,除非另有明确的规定和限定,“连接”等术语应做广义理解,例如,可以是电连接或可以互相通讯;可以是直接相连,也可以通过中间媒介间接相连。对于本领域的普通技术人员而言,可以根据具体情况理解上述术语在本申请中的具体含义。In this application, unless otherwise expressly specified and limited, terms such as "connection" should be understood in a broad sense, for example, it may be an electrical connection or may communicate with each other; it may be directly connected or indirectly connected through an intermediate medium. For those of ordinary skill in the art, the specific meanings of the above terms in this application can be understood according to specific situations.
如上所述,动态图像例如动画表情等由于其特殊的制作方式,有着不同于自然图像的特性,与自然图像有一些显著区别,目前暂无针对动态图像的隐写方法,适用于自然图像的方法应用在其上效果不太好。一些相关技术中应用于自然图像的基于综合格架编码(Syndrome-Trellis Codes,STC)的隐写方法,目前还无法应用到动态图像。As mentioned above, dynamic images, such as animated expressions, have different characteristics from natural images due to their special production methods, and there are some significant differences from natural images. At present, there is no steganography method for dynamic images, but a method suitable for natural images. Applying on it doesn't work very well. The steganography methods based on Syndrome-Trellis Codes (STC) applied to natural images in some related technologies cannot be applied to dynamic images at present.
因此,本申请提供了一种动态图像隐写方法,通过从动态图像中获得多帧载体图像中各帧载体图像的包括索引矩阵和调色板的彩色索引图像,对索引矩阵中的各个值进行修改获得修改索引矩阵后,根据索引矩阵索引调色板获得的各帧载体图像的各通道的像素值以及修改索引矩阵索引调色板获得的各帧载体图像的各通道的修改像素值获得各帧载体图像的失真代价矩阵,再基于各帧载体图像的失真代价矩阵将待隐写信息嵌入索引矩阵获得各帧载体图像的隐写索引矩阵,最后根据各帧载体图像的隐写索引矩阵和各帧载体图像的调色板获得多帧隐写图像,以合成动态隐写图像,从而可实现对动态图像进行隐写。Therefore, the present application provides a dynamic image steganography method, by obtaining a color index image including an index matrix and a color palette of each frame of carrier images in a multi-frame carrier image from a dynamic image, and performing a process on each value in the index matrix. After modifying and obtaining the modified index matrix, each frame is obtained according to the pixel value of each channel of each frame carrier image obtained by the index matrix index palette and the modified pixel value of each channel of each frame carrier image obtained by modifying the index matrix index palette. The distortion cost matrix of the carrier image, and then embedding the information to be steganographic into the index matrix based on the distortion cost matrix of the carrier image of each frame to obtain the steganographic index matrix of the carrier image of each frame, and finally according to the steganographic index matrix of the carrier image of each frame and each frame The palette of the carrier image is used to obtain multiple frames of steganographic images to synthesize dynamic steganographic images, so that steganography of dynamic images can be realized.
图1示出了可以应用本申请的动态图像隐写方法或动态图像隐写装置的示例性系统架构10。FIG. 1 shows an exemplary system architecture 10 to which the dynamic image steganography method or dynamic image steganography apparatus of the present application may be applied.
如图1所示,系统架构10可以包括终端设备102、网络104和服务器106。终端设备102可以是具有显示屏并且支持输入、输出的各种电子设备,包括但不限于智能手机、平板电脑、膝上型便携计算机、台式计算机、可穿戴设备、虚拟现实设备、智能家居等等。网络104用以在终端设备102和服务器106之间提供通信链路的介质。网络104可以包括各种连接类型,例如有线、无线通信链路或者光纤电缆等等。服务器106可以是提供各种服务的服务器或服务器集群等。As shown in FIG. 1 , the system architecture 10 may include end devices 102 , a network 104 and a server 106 . The terminal device 102 can be various electronic devices with a display screen and supporting input and output, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, wearable devices, virtual reality devices, smart homes, etc. . The network 104 is the medium used to provide the communication link between the terminal device 102 and the server 106 . The network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others. The server 106 may be a server or server cluster or the like that provides various services.
用户可以使用终端设备102通过网络104与服务器106交互,以接收或发送数据等。例如用户使用终端设备102通过网络104将待隐写的信息和载体动态图像上传到服务器106上,然后通过终端设备102上获取服务器106通过网络104传输的隐写动态图像。又例如用户使用终端设备102输入隐写参数,然后通过网络104上传到服务器106。The user can use the terminal device 102 to interact with the server 106 through the network 104 to receive or send data and the like. For example, the user uses the terminal device 102 to upload the information to be steganographic and the carrier dynamic image to the server 106 through the network 104 , and then obtains the steganographic dynamic image transmitted by the server 106 through the network 104 through the terminal device 102 . For another example, the user uses the terminal device 102 to input the steganographic parameters, which are then uploaded to the server 106 through the network 104 .
应该理解,图1中的终端设备、网络和服务器的数目仅仅是示意性的。根据实现需要,可以具有任意数目的终端设备、网络和服务器。It should be understood that the numbers of terminal devices, networks and servers in FIG. 1 are merely illustrative. There can be any number of terminal devices, networks and servers according to implementation needs.
图2是根据一示例性实施例示出的一种动态图像隐写方法的流程图。如图2所示的动态图像隐写方法例如可以应用于上述系统的服务器端,也可以应用于上述系统的终端设备。Fig. 2 is a flow chart of a dynamic image steganography method according to an exemplary embodiment. The dynamic image steganography method shown in FIG. 2 can be applied to, for example, the server side of the above-mentioned system, and can also be applied to the terminal device of the above-mentioned system.
参考图2,本申请实施例提供的方法20可以包括以下步骤。Referring to FIG. 2 , the method 20 provided by this embodiment of the present application may include the following steps.
在步骤S202中,获得多帧载体图像中各帧载体图像的彩色索引图像,多帧载体图像从动态图像中获得,彩色索引图像包括索引矩阵和调色板。动态图像是随时间流动而改变形态的图像,可以是图像交换格式(Graphics Interchange Format,GIF)的图像,GIF图像的特点是其在一个GIF文件中可以存多幅彩色图像,在显示时把存于一个文件中的多幅图像数据逐幅读出并显示到屏幕上,即为GIF动画,例如动画表情、短视频转换成的动图等等。In step S202, a color index image of each frame of the carrier image in the multi-frame carrier image is obtained, the multi-frame carrier image is obtained from the dynamic image, and the color index image includes an index matrix and a color palette. A dynamic image is an image that changes shape over time, and can be an image in the Graphics Interchange Format (GIF). The multiple image data in a file is read out one by one and displayed on the screen, that is, GIF animation, such as animated expressions, animations converted from short videos, and so on.
在一些实施例中,例如,可分解动画表情获得多帧彩色索引图像。可读取动画表情,将该动画表情拆成多帧彩色索引图像,并记录得到的各帧的基本信息,例如:索引矩阵、调色板、延迟时间、帧数n、图像高度h、宽度w等等。In some embodiments, for example, an animated expression may be decomposed to obtain multiple frames of color-indexed images. It can read the animation expression, split the animation expression into multi-frame color index images, and record the basic information of each frame obtained, such as: index matrix, palette, delay time, frame number n, image height h, width w and many more.
在一些实施例中,例如,可在分解动画表情获得各帧载体图像的初始索引矩阵和初始调色板后,对初始调色板重新排序获得新的调色板,并生成对应于新的调色板的新索引矩阵,具体实施方式可参照图3。In some embodiments, for example, after decomposing the animated expressions to obtain the initial index matrix and initial color palette of each frame of carrier image, reordering the initial color palette can obtain a new color palette, and generating a new color palette corresponding to the new color palette. The new index matrix of the color palette, the specific implementation can refer to FIG. 3 .
在步骤S204中,对索引矩阵中的各个值进行修改,获得修改索引矩阵。索引矩阵是从调色板中索引各像素的各通道颜色(像素值)的矩阵,对索引矩阵进行修改即相当于对各通道的像素值进行修改。修改方式可为加1或减1等等。In step S204, each value in the index matrix is modified to obtain a modified index matrix. The index matrix is a matrix that indexes the color (pixel value) of each channel of each pixel from the palette, and modifying the index matrix is equivalent to modifying the pixel value of each channel. The modification method can be plus 1 or minus 1 and so on.
在一些实施例中,可记当前帧(第k帧,k为大于1的正整数)彩色索引图的索引矩阵为IN k,调色板为MN kIn some embodiments, the index matrix of the color index map of the current frame (the kth frame, where k is a positive integer greater than 1) can be recorded as IN k , and the color palette as MN k .
在步骤S206中,根据索引矩阵索引调色板,获得各帧载体图像的各通道的像素值。In step S206, the color palette is indexed according to the index matrix, and the pixel value of each channel of each frame of carrier image is obtained.
在一些实施例中,例如,记图像对应的红(Red,R)、绿(Green,G)、蓝(Blue,B)通道像素值矩阵分别为R1=(R1 ij),G1=(G1 ij),B1=(B1 ij)∈{0,…,255} h×w,其中,h为图像高度,w为图像宽度,单位都为像素个数,i为大于0小于w的正整数,j为大于0小于h的正整数,利用索引矩阵IN k中(i,j)位置处的索引值对应调色板MN k中RGB通道像素值分别为R1 ij、G1 ij、B1 ijIn some embodiments, for example, the red (Red, R), green (Green, G), and blue (Blue, B) channel pixel value matrices corresponding to the recorded image are respectively R1=(R1 ij ), G1=(G1 ij ) ), B1=(B1 ij )∈{0,…,255} h×w , where h is the height of the image, w is the width of the image, the unit is the number of pixels, i is a positive integer greater than 0 and less than w, j is a positive integer greater than 0 and less than h, using the index value at the position (i, j) in the index matrix IN k to correspond to the pixel values of the RGB channels in the palette MN k as R1 ij , G1 ij , and B1 ij , respectively.
在步骤S208中,根据修改索引矩阵索引调色板,获得各帧载体图像的各通道的修改像素值。In step S208, the modified pixel value of each channel of the carrier image of each frame is obtained by indexing the palette according to the modified index matrix.
在一些实施例中,例如,修改后第(i,j)个像素的像素值为R2 ij=R1 ij±1,G2 ij=G1 ij±1, B2 ij=B1 ij±1。 In some embodiments, for example, the pixel value of the (i,j)th pixel after modification is R2 ij = R1 ij ±1, G2 ij = G1 ij ±1, B2 ij = B1 ij ±1.
在步骤S210中,根据各帧载体图像的各通道的像素值和各帧载体图像的各通道的修改像素值获得各帧载体图像的失真代价矩阵。对于各帧载体图像的各通道,可采用高通滤波器对各通道像素进行滤波后取滤波结果的绝对值,然后采用低通滤波器对滤波结果的绝对值进行平滑获得最终残差后取倒数,分别获得各帧载体图像的各通道的失真代价值。在获得各通道的失真代价值后,分别获得各帧载体图像的各通道的像素值与修改像素值的差,再根据各帧载体图像的各通道的像素值与修改像素值的差以及各帧载体图像的各通道的失真代价值获得各帧载体图像的失真代价矩阵。In step S210, the distortion cost matrix of each frame of carrier image is obtained according to the pixel value of each channel of each frame of carrier image and the modified pixel value of each frame of carrier image. For each channel of the carrier image of each frame, a high-pass filter can be used to filter the pixels of each channel and then the absolute value of the filtering result can be obtained, and then a low-pass filter can be used to smooth the absolute value of the filtering result to obtain the final residual, and then take the reciprocal. The distortion cost value of each channel of each frame of carrier image is obtained respectively. After obtaining the distortion cost value of each channel, obtain the difference between the pixel value of each channel of the carrier image of each frame and the modified pixel value, and then according to the difference between the pixel value and the modified pixel value of each channel of the carrier image of each frame and the The distortion cost value of each channel of the carrier image is used to obtain the distortion cost matrix of each frame of carrier image.
在一些实施例中,例如,采用图3的方法获得彩色索引图像时,可获得各帧载体图像的各通道的像素值与修改像素值的差的平方和,然后对各帧载体图像的各通道的失真代价值求平均获得各帧载体图像的总失真代价值,再将各帧载体图像的总失真代价值与各通道的像素值与修改像素值的差的平方和相乘,获得各帧载体图像的失真代价矩阵。记RGB通道的失真代价值分别为ρR=(ρR ij),ρG=(ρG ij),ρB=(ρB ij),则RGB通道的失真代价值以及总失真代价值ρ可由下式获得: In some embodiments, for example, when the method of FIG. 3 is used to obtain the color index image, the square sum of the difference between the pixel value of each channel of each frame of carrier image and the modified pixel value can be obtained, and then the The total distortion cost value of each frame carrier image is averaged to obtain the total distortion cost value of each frame carrier image, and then the total distortion cost value of each frame carrier image is multiplied by the square sum of the difference between the pixel value of each channel and the modified pixel value to obtain each frame carrier image. The distortion cost matrix of the image. Denote the distortion cost value of RGB channel as ρR=(ρR ij ), ρG=(ρG ij ), ρB=(ρB ij ), then the distortion cost value and total distortion cost value ρ of RGB channel can be obtained by the following formula:
Figure PCTCN2021141728-appb-000001
Figure PCTCN2021141728-appb-000001
Figure PCTCN2021141728-appb-000002
Figure PCTCN2021141728-appb-000002
Figure PCTCN2021141728-appb-000003
Figure PCTCN2021141728-appb-000003
ρ=(ρR+ρG+ρB)/3       (4)ρ=(ρR+ρG+ρB)/3 (4)
以上式中,“*”为线性卷积运算,卷积采用对称填充的形式使得卷积后图像大小不变;H为高通滤波器,L 1与L 2是不同的低通滤波器。本申请的方法是将索引矩阵送入例如STC编码框架的隐写算法做隐写,对索引矩阵做±1操作后,索引值改变了1,且调色板按照像素值平方重新排序后,图像像素由R1(i,j),G1(i,j),B1(i,j)变为了R2(i,j),G2(i,j),B2(i,j),所以需要在得出的ρ上再乘以两者差值的平方和才是颜色的真正改变量。对于当前第k帧,R1(i,j),G1(i,j),B1(i,j)为当前帧的索引矩阵IN k的(i,j)位置处的索引值对应的调色板MN k中的三通道值,R2(i,j),G2(i,j),B2(i,j)则为索引值±1后的新的索引对应的三通道值,则可获得当前帧(i,j)位置处的像素的最终失真代价值ρ t(i,j)为: In the above formula, "*" is a linear convolution operation, and the convolution adopts the form of symmetrical filling so that the image size after convolution remains unchanged; H is a high-pass filter, and L 1 and L 2 are different low-pass filters. The method of the present application is to send the index matrix into a steganography algorithm such as the STC coding framework for steganography. After performing a ±1 operation on the index matrix, the index value changes by 1, and the color palette is reordered according to the square of the pixel value. The pixel is changed from R1(i,j), G1(i,j), B1(i,j) to R2(i,j), G2(i,j), B2(i,j), so it is necessary to obtain The real change in color is the sum of the squares of the difference between the two multiplied by the ρ. For the current kth frame, R1(i,j), G1(i,j), B1(i,j) are the palettes corresponding to the index values at the position (i,j) of the index matrix IN k of the current frame The three-channel value in MN k , R2(i,j), G2(i,j), B2(i,j) are the three-channel value corresponding to the new index after the index value ±1, then the current frame can be obtained The final distortion cost value ρ t (i, j) of the pixel at position (i, j) is:
ρ t(i,j)=ρ·((R1(i,j)-R2(i,j)) 2+(G1(i,j)-G2(i,j)) 2+(B1(i,j)-B2(i,j)) 2)        (5) ρ t (i,j)=ρ·((R1(i,j)-R2(i,j)) 2 +(G1(i,j)-G2(i,j)) 2 +(B1(i, j)-B2(i,j)) 2 ) (5)
在一些实施例中,采用图3的方法获得彩色索引图像时,也可在获得各帧载体图像的各通道的像素值与修改像素值的差的平方后,将各帧载体图像的各通道的失真代价值分别与各通道的像素值与修改像素值的差的平方相乘,再将三个通道的乘积求和,获得各帧载体图像的失真代价矩阵。In some embodiments, when the method of FIG. 3 is used to obtain the color index image, after obtaining the square of the difference between the pixel value of each channel of each frame of carrier image and the modified pixel value, the The distortion cost value is multiplied by the square of the difference between the pixel value of each channel and the modified pixel value, and then the products of the three channels are summed to obtain the distortion cost matrix of each frame of carrier image.
在一些实施例中,在获得各像素点的最终失真代价值时,可通过判断帧间的像素的变化是否适合隐藏信息,对如式(5)的计算最终失真代价值进行修正,具体实施方式可参照图4。In some embodiments, when the final distortion cost value of each pixel is obtained, the final distortion cost value calculated as in Equation (5) can be corrected by judging whether the change of pixels between frames is suitable for hiding information. Refer to Figure 4.
在步骤S212中,基于各帧载体图像的失真代价矩阵将待隐写信息嵌入索引矩阵,获得各帧载体图像的隐写索引矩阵。可采用二元隐写编码进行秘密信息嵌入,例如STC编码的方式,将通过式(5)或式(6)计算获得的各像素点的失真代价函值组成的失真代价矩阵、索引矩阵以及秘密信息送入STC编码框架,获得各帧载体图像的隐写索引矩阵,以生成含密图像。嵌入信息的具体实施方式可参照图7。In step S212, the information to be steganographic is embedded in the index matrix based on the distortion cost matrix of each frame of carrier image, and the steganographic index matrix of each frame of carrier image is obtained. The secret information can be embedded by binary steganographic coding, such as STC coding, the distortion cost matrix, index matrix and secret value composed of the distortion cost function value of each pixel point calculated by formula (5) or formula (6) The information is sent into the STC coding framework to obtain the steganographic index matrix of the carrier image of each frame to generate the dense image. The specific implementation of the embedded information can refer to FIG. 7 .
在步骤S214中,根据各帧载体图像的隐写索引矩阵和各帧载体图像的调色板获得多帧隐写图像,以合成动态隐写图像。按照获得初始动态图像时读入的延迟时间,将多个帧的含密隐写图像合并输出为动态图像,即可得到隐藏了秘密信息的动态图像。In step S214, multiple frames of steganographic images are obtained according to the steganographic index matrix of each frame of carrier image and the palette of each frame of carrier image to synthesize dynamic steganographic images. According to the delay time read in when the initial dynamic image is obtained, a dynamic image with hidden secret information can be obtained by combining and outputting the secret steganographic images of multiple frames as a dynamic image.
根据本申请实施例提供的动态图像隐写方法,通过从动态图像中获得多帧载体图像中各帧载体图像的包括索引矩阵和调色板的彩色索引图像,对索引矩阵中的各个值进行修改获得修改索引矩阵后,根据索引矩阵索引调色板获得的各帧载体图像的各通道的像素值以及修改索引矩阵索引 调色板获得的各帧载体图像的各通道的修改像素值获得各帧载体图像的失真代价矩阵,再基于各帧载体图像的失真代价矩阵将待隐写信息嵌入索引矩阵获得各帧载体图像的隐写索引矩阵,最后根据各帧载体图像的隐写索引矩阵和各帧载体图像的调色板获得多帧隐写图像,以合成动态隐写图像,从而可实现基于动态索引图像进行隐写,更适用于彩色图像且更隐蔽,更不易检测;可使基于STC编码的隐写方法更适用于将要发送的信息隐藏在可公开的动态载体图像中传送,实现收发端载体的传输,提高信息嵌入率和安全性。According to the dynamic image steganography method provided by the embodiment of the present application, each value in the index matrix is modified by obtaining a color index image including an index matrix and a color palette of each frame of the carrier image in the multi-frame carrier image from the dynamic image. After the modified index matrix is obtained, each frame carrier is obtained according to the pixel value of each channel of each frame carrier image obtained by the index matrix index palette and the modified pixel value of each channel of each frame carrier image obtained by modifying the index matrix index palette. The distortion cost matrix of the image, and then based on the distortion cost matrix of the carrier image of each frame, the steganographic information is embedded in the index matrix to obtain the steganographic index matrix of the carrier image of each frame, and finally the steganographic index matrix of the carrier image of each frame and the carrier image of each frame are obtained. The color palette of the image obtains multiple frames of steganographic images to synthesize dynamic steganographic images, so that steganography based on dynamic index images can be realized, which is more suitable for color images and is more concealed and difficult to detect; it can make steganography based on STC coding. The writing method is more suitable for hiding the information to be sent in a public dynamic carrier image for transmission, realizing the transmission of the carrier at the transceiver end, and improving the information embedding rate and security.
图3示出了图2中所示的步骤S202在一实施例中的处理过程示意图。如图3所示,本申请实施例中,上述步骤S202可以进一步包括以下步骤。FIG. 3 shows a schematic diagram of the processing procedure of step S202 shown in FIG. 2 in an embodiment. As shown in FIG. 3 , in this embodiment of the present application, the foregoing step S202 may further include the following steps.
步骤S2022,获取各帧载体图像的初始索引矩阵和初始调色板。Step S2022, acquiring the initial index matrix and initial color palette of each frame of carrier image.
步骤S2024,将各帧载体图像的初始调色板按照各通道值的平方和重新排序,获得各帧载体图像的调色板。Step S2024: Reorder the initial palettes of the carrier images of each frame according to the sum of squares of the values of each channel to obtain the palette of the carrier images of each frame.
步骤S2026,根据各帧载体图像的初始索引矩阵、初始调色板、以及调色板获得各帧载体图像的索引矩阵。对于各帧载体图像,可在其作为用来隐藏秘密信息的当前帧图像时,将读入的初始调色板按照各通道值的平方和重新排序生成新的调色板,并生成对应于新调色板的新索引矩阵。Step S2026: Obtain the index matrix of each frame of carrier image according to the initial index matrix of each frame of carrier image, the initial palette, and the palette. For each frame of carrier image, when it is used as the current frame image used to hide the secret information, the read-in initial palette can be reordered according to the sum of the squares of the channel values to generate a new palette, and a new palette corresponding to the new palette can be generated. New index matrix for palettes.
根据本申请实施例提供的调色板重新排序方法,通过将初始调色板按照各通道值的平方和重新排序,增加了对载体图像进行修改的复杂程度,从而可实现提高对索引图像进行隐写的隐蔽性和抗检测性。According to the palette reordering method provided by the embodiment of the present application, by reordering the initial palette according to the sum of the squares of the values of each channel, the complexity of modifying the carrier image is increased, so that it is possible to improve the concealment of the index image. Write stealth and detection resistance.
图4是根据一示例性实施例示出的一种失真代价获得方法的流程图。如图4所示的方法例如可以应用于上述系统的服务器端,也可以应用于上述系统的终端设备。Fig. 4 is a flowchart of a method for obtaining a distortion cost according to an exemplary embodiment. The method shown in FIG. 4 can be applied to, for example, the server side of the above-mentioned system, and can also be applied to the terminal device of the above-mentioned system.
参考图4,本申请实施例提供的方法40可以包括以下步骤。Referring to FIG. 4 , the method 40 provided by this embodiment of the present application may include the following steps.
在步骤S402中,获取当前帧载体图像的彩色索引图像,当前帧载体图像为多帧载体图像中第一帧载体图像之后的任意一帧。In step S402, a color index image of the carrier image of the current frame is obtained, and the carrier image of the current frame is any frame after the carrier image of the first frame of the carrier images of the multiple frames.
在步骤S404中,对当前帧载体图像的彩色索引图像进行灰度转换,获得当前帧载体图像的灰度图。In step S404, grayscale conversion is performed on the color index image of the carrier image of the current frame to obtain a grayscale image of the carrier image of the current frame.
在步骤S406中,获取当前帧载体图像的前一帧载体图像的彩色索引图像。In step S406, the color index image of the carrier image of the previous frame of the carrier image of the current frame is acquired.
在步骤S408中,对前一帧隐写图像的彩色索引图像进行灰度转换,获得前一帧载体图像的灰度图。In step S408, grayscale conversion is performed on the color index image of the steganographic image of the previous frame to obtain the grayscale image of the carrier image of the previous frame.
在一些实施例中,可记当前第k帧彩色索引图转换成的灰度图为G k=(G ij),其前一帧已经嵌入了秘密信息的含密隐写图像对应的灰度图为G k-1=(B ij)。 In some embodiments, the gray image converted from the color index image of the current k-th frame can be recorded as G k =(G ij ), and the gray image corresponding to the steganographic image in which secret information has been embedded in the previous frame is G k-1 =(B ij ).
在步骤S410中,将当前帧载体图像的灰度图与前一帧载体图像的灰度图作差后求平方,获得当前帧载体图像中各像素的亮度变化量。In step S410, the difference between the grayscale image of the carrier image of the current frame and the grayscale image of the carrier image of the previous frame is squared to obtain the luminance variation of each pixel in the carrier image of the current frame.
在步骤S412中,获得亮度变化阈值。In step S412, a luminance change threshold is obtained.
在步骤S414中,在当前帧载体图像中一像素的亮度变化量大于亮度变化阈值时,将当前帧载体图像的总失真代价值与该像素各通道的像素值与修改像素值的差的平方和相乘,获得该像素的颜色改变量,以获得各帧载体图像的失真代价矩阵。In step S414, when the luminance variation of a pixel in the current frame carrier image is greater than the luminance variation threshold, the sum of the squares of the difference between the total distortion cost value of the current frame carrier image and the pixel value of each channel of the pixel and the modified pixel value is calculated Multiply to obtain the color change amount of the pixel to obtain the distortion cost matrix of each frame of carrier image.
在步骤S4162中,在当前帧载体图像中一像素的亮度变化量不大于亮度变化阈值时,获得失真代价权重,失真代价权重为大于1的值。In step S4162, when the luminance variation of a pixel in the current frame carrier image is not greater than the luminance variation threshold, a distortion cost weight is obtained, and the distortion cost weight is a value greater than 1.
在步骤S4164中,将当前帧载体图像的总失真代价值与该像素各通道的像素值与修改像素值的差的平方和相乘后再乘以失真代价权重,获得该像素的颜色改变量,以获得各帧载体图像的失真代价矩阵。In step S4164, the total distortion cost value of the current frame carrier image is multiplied by the square sum of the difference between the pixel value of each channel of the pixel and the modified pixel value, and then multiplied by the distortion cost weight to obtain the color change amount of the pixel, to obtain the distortion cost matrix of each frame carrier image.
在一些实施例中,可记亮度变化阈值为ε,失真代价权重为δ,δ>1,则式(5)可改写成:In some embodiments, the brightness change threshold can be recorded as ε, the distortion cost weight is δ, and δ>1, then equation (5) can be rewritten as:
Figure PCTCN2021141728-appb-000004
Figure PCTCN2021141728-appb-000004
式中,将((G ij)-(B ij)) 2与预先设定的阈值ε作比较,若大于该阈值则表明该处是变化大的区域,适宜隐藏信息;若比阈值小,则表明该处是变化平坦的区域,不适合做隐写,因而失真代价值需要再乘以一个大于1的权值δ。 In the formula, ((G ij )-(B ij )) 2 is compared with the preset threshold ε, if it is greater than the threshold, it indicates that the area is a region with large changes, suitable for hiding information; if it is smaller than the threshold, then It shows that this area is a flat area, which is not suitable for steganography, so the distortion cost value needs to be multiplied by a weight δ greater than 1.
在一些实施例中,例如,在载体动态图像为动画表情的情况下,人物线条是构成动画表情的主要成分,且线条上各个点的像素值相近;同时图像中存在着大面积着色区域,且同一区域像素 值一致,所以若修改着色区域,则很容易发现含密图像的异常。可考虑上述特性对公式(6)作一约束,图像的轮廓(边界)区域的部分按公式(6)计算失真代价值,而非轮廓区域设置失真代价值为一个预设失真值,而预设失真值为一个很大的阈值,即这部分不进行信息的嵌入,可有效提高了含密图像的质量。图像边界信息提取方法的具体实施方式可参照图5。In some embodiments, for example, when the carrier dynamic image is an animated expression, the character line is the main component of the animated expression, and the pixel values of each point on the line are similar; at the same time, there is a large area of coloring in the image, and The pixel values in the same area are the same, so if you modify the shaded area, it is easy to find abnormalities in dense images. The above characteristics can be considered as a constraint on formula (6), the part of the contour (boundary) area of the image is calculated according to formula (6), and the distortion cost value is set to a preset distortion value in the non-contour area, and the preset The distortion value is a large threshold, that is, no information is embedded in this part, which can effectively improve the quality of dense images. For a specific implementation of the method for extracting image boundary information, reference may be made to FIG. 5 .
根据本申请实施例提供的失真代价获得方法,通过在计算各像素的失真代价时考虑帧间对应像素亮度的变化是否适合用来隐藏信息,可使本方法更适合对动态图像进行隐写,提高了含密图像的安全性。According to the method for obtaining the distortion cost provided by the embodiment of the present application, when calculating the distortion cost of each pixel, by considering whether the change in the brightness of the corresponding pixels between frames is suitable for hiding information, the method can be more suitable for steganography of dynamic images, and the improvement is improved. security of encrypted images.
图5是根据一示例性实施例示出的一种图像边界方法的流程图。如图5所示的方法例如可以应用于上述系统的服务器端,也可以应用于上述系统的终端设备。Fig. 5 is a flowchart of an image boundary method according to an exemplary embodiment. The method shown in FIG. 5 can be applied to, for example, the server side of the above-mentioned system, and can also be applied to the terminal device of the above-mentioned system.
参考图5,本申请实施例提供的方法50可以包括以下步骤。Referring to FIG. 5 , the method 50 provided by this embodiment of the present application may include the following steps.
在步骤S502中,对各帧载体图像的彩色索引图像进行二值化处理,获得各帧载体图像的二值图像。In step S502, binarization processing is performed on the color index image of each frame of carrier image to obtain a binary image of each frame of carrier image.
在步骤S504中,提取各帧载体图像的二值图像的边界信息,获得各帧载体图像的各像素的边界信息值。In step S504, the boundary information of the binary image of each frame of carrier image is extracted, and the boundary information value of each pixel of each frame of carrier image is obtained.
在一些实施例中,例如,可记C k=(C ij)为当前帧提取的边界信息,则当前帧(i,j)位置处的像素为边界时记为C ij=1,1为真边界值;当前帧(i,j)位置处的像素不为边界时可记为C ij=0。 In some embodiments, for example, C k =(C ij ) can be denoted as the boundary information extracted from the current frame, then when the pixel at the position (i,j) of the current frame is the boundary, denote C ij =1, and 1 is true Boundary value; when the pixel at the position of the current frame (i, j) is not a boundary, it can be recorded as C ij =0.
根据本申请实施例提供的方法,通过计算各像素的失真代价时考虑边界信息,在图像轮廓处进行隐写,提高了含密动画表情的视觉效果,并提高了隐写的安全性。According to the method provided by the embodiment of the present application, by considering the boundary information when calculating the distortion cost of each pixel, steganography is performed at the outline of the image, which improves the visual effect of the dense animated expression and improves the security of steganography.
图6是根据图2至图5示出的一种动画表情隐写方法的框架图。如图6所示,首先分解(S602)动画表情6002为多帧彩色索引图像6004,按照设计的信息嵌入方法分别对每帧图像进行秘密信息的嵌入(S604),得到多张隐藏了秘密信息的图像6006,将多个帧合并(S606)输出为动画图像,得到隐藏了秘密信息的动画表情。FIG. 6 is a frame diagram of an animation expression steganography method shown in FIGS. 2 to 5 . As shown in FIG. 6 , first decompose (S602) the animated expression 6002 into multiple frames of color index images 6004, and embed secret information for each frame of images according to the designed information embedding method (S604) to obtain multiple images with hidden secret information. In the image 6006, a plurality of frames are combined (S606) and output as an animation image to obtain an animation expression with secret information hidden.
图7是根据图2至图6示出的一种各帧图像的隐写流程示意图。如图7所示,对于当前帧用来隐藏秘密信息的图像7002,首先将读入的调色板按照RGB三通道值的平方的和重新排序生成新的调色板(S702),并生成对应于新调色板的新索引矩阵(S704)。然后将当前彩色索引图二值化生成二值图像(S706),然后提取二值图像的边界信息(S708),该边界信息用于定义失真代价函数。再将当前帧彩色索引图7002与前一帧已隐藏了秘密信息的彩色索引图7004均转换为灰度图(S7102,S7104),也用于定义失真代价函数。最后,根据提取的边界信息,当前帧与前一帧的灰度图像,以及当前帧的新的调色板及索引矩阵,定义失真代价函数,计算各像素的失真代价函值(S712),并将计算的失真代价函值、索引矩阵以及秘密信息7006送入STC编码框架(S714),即能得到含密图像7008。FIG. 7 is a schematic diagram of a steganographic process of each frame of images shown in FIGS. 2 to 6 . As shown in FIG. 7 , for the image 7002 used to hide the secret information in the current frame, first reorder the read palette according to the sum of the squares of the RGB three-channel values to generate a new palette (S702), and generate a corresponding palette A new index matrix for the new palette (S704). Then, the current color index image is binarized to generate a binary image (S706), and then the boundary information of the binary image is extracted (S708), and the boundary information is used to define a distortion cost function. Then, the color index map 7002 of the current frame and the color index map 7004 of the previous frame in which secret information has been hidden are both converted into grayscale images (S7102, S7104), which are also used to define the distortion cost function. Finally, according to the extracted boundary information, the grayscale images of the current frame and the previous frame, and the new palette and index matrix of the current frame, define a distortion cost function, calculate the distortion cost function value of each pixel (S712), and The calculated distortion cost function value, index matrix and secret information 7006 are sent to the STC coding framework (S714), and the secret image 7008 can be obtained.
图8是根据图2至图6示出的动态图像隐写方法对多幅动画表情进行STC编码隐写的一组实验结果示例图。如图8(a)至(i)所示,由原始图像分别与对应的隐写了600比特和1100比特的秘密信息的含密图像的对比中可以看出,隐藏了秘密信息的图像视觉效果良好,肉眼看不出信息的存在,不同嵌入率下的含密图像无明显视觉差异,可见该方法的实验效果良好。FIG. 8 is a set of example diagrams of experimental results of performing STC coding steganography on multiple animation expressions according to the dynamic image steganography method shown in FIG. 2 to FIG. 6 . As shown in Figure 8(a) to (i), it can be seen from the comparison between the original image and the corresponding secret images with steganographic 600-bit and 1100-bit secret information respectively, the visual effect of the image with the secret information hidden Good, the existence of information cannot be seen by the naked eye, and there is no obvious visual difference between dense images under different embedding rates, which shows that the experimental effect of this method is good.
图9是根据图2至图6示出的动态图像隐写方法与现有技术方法计算出的图像的失真代价值的二维化图像的对比。现有技术方法中,在计算失真代价时未将各通道的像素修改分别进行考虑。如图9所示,(a)为原始载体图像,(b)为图像边界信息,(c)为本申请方法计算的像素+1的失真代价值,(d)为本申请方法计算的像素-1的失真代价值,(e)现有技术方法计算的像素+1的失真代价值,(f)现有技术方法计算的像素-1的失真代价值。由图9可以看出,本申请方法计算出的失真代价值的分布明显不同于现有技术方法计算的失真代价值的分布,本申请方法的失真代价值的二维图像与原始图像提取出的轮廓边界信息相近,而根据现有技术方法计算出的失真代价值在大面积着色区域较小,其他区域则较大,可见现有技术方法在嵌入信息时会优先修改大面积着色区域。根据动画表情的特性:动画图像的颜色信息在轮廓处较为丰富且各个颜色相近,其他大面积着色区域为单一颜色,不适宜改动。可见,本申请方法提出的失真代价函数很好地贴合了动画图像的特性,优先在表情图像的轮廓区域进行信息的嵌入。FIG. 9 is a comparison of the two-dimensional image of the distortion cost value of the image calculated according to the dynamic image steganography method shown in FIG. 2 to FIG. 6 and the method of the prior art. In the prior art method, the pixel modification of each channel is not considered separately when calculating the distortion cost. As shown in Figure 9, (a) is the original carrier image, (b) is the image boundary information, (c) is the pixel+1 distortion cost value calculated by the method of the application, (d) is the pixel-calculated by the method of the application Distortion cost value of 1, (e) Distortion cost value of pixel+1 calculated by the prior art method, (f) Distortion cost value of pixel-1 calculated by the prior art method. As can be seen from Figure 9, the distribution of the distortion cost value calculated by the method of the present application is obviously different from the distribution of the distortion cost value calculated by the prior art method, the two-dimensional image of the distortion cost value of the method of the present application and the original image are extracted. The contour boundary information is similar, and the distortion cost calculated according to the prior art method is smaller in the large-area coloring area, and larger in other areas. It can be seen that the prior art method preferentially modifies the large-area coloring area when embedding information. According to the characteristics of animation expressions: the color information of the animation image is rich in the outline and the colors are similar, and the other large-area coloring areas are a single color, which is not suitable for modification. It can be seen that the distortion cost function proposed by the method of the present application fits well with the characteristics of animation images, and information is preferentially embedded in the contour area of the expression image.
下表给出了本申请方法与现有技术方法的对比实验数据,表中给出了在6个不同的嵌入量情况下两种方法的测试误差。可以看出,在差分像素邻接矩阵(Subtractive Pixel Adjacency Matrix, SPAM)特征及嵌入信息为600比特(bit)的情况下,本申请式(6)提出的失真代价函数的PE值较现有技术提高了14.97%;在空间领域模型(Spatial Rich Model,SRMQ1)特征及600bit下PE值提高了9.09%。在SPAM特征及嵌入信息为1100bit的情况下,本申请式(6)提出的失真代价函数较现有技术方法的PE值提高了12.85%;在SRMQ1特征及1100bit下本方法的PE值提高了4.86%。The following table shows the comparative experimental data between the method of the present application and the method of the prior art, and the test errors of the two methods under the condition of 6 different embedding amounts are shown in the table. It can be seen that when the Subtractive Pixel Adjacency Matrix (SPAM) feature and embedded information are 600 bits (bit), the PE value of the distortion cost function proposed by the formula (6) of the present application is higher than that of the prior art. improved by 14.97%; the PE value increased by 9.09% in the spatial domain model (Spatial Rich Model, SRMQ1) feature and 600bit. When the SPAM feature and embedded information are 1100 bits, the distortion cost function proposed in the formula (6) of the present application is 12.85% higher than the PE value of the prior art method; the PE value of this method is increased by 4.86 under the SRMQ1 feature and 1100 bits. %.
Figure PCTCN2021141728-appb-000005
Figure PCTCN2021141728-appb-000005
图10和图11绘制了上表中的数据,给出了本申请方法与现有技术分别在SPAM、SRMQ1特征下的测试误差对比可以直观地看出,两种方法的测试误差均随着嵌入比特数的增加而降低;同时,本申请提出的方法无论在何种嵌入率下,PE值均远远高于现有技术。Figures 10 and 11 plot the data in the above table, and show the comparison of the test errors between the method of the present application and the prior art under the SPAM and SRMQ1 features, respectively. It can be seen intuitively that the test errors of the two methods increase with the embedded At the same time, the PE value of the method proposed in the present application is much higher than that of the prior art regardless of the embedding rate.
从以上实验数据中可以看出,本申请方法的性能明显优于现有技术,表明本申请方法的抗隐写分析能力更强。It can be seen from the above experimental data that the performance of the method of the present application is obviously better than that of the prior art, indicating that the method of the present application has stronger anti-steganalysis ability.
图12是根据一示例性实施例示出的一种动态图像隐写装置的框图。如图12所示的装置例如可以应用于上述系统的服务器端,也可以应用于上述系统的终端设备。Fig. 12 is a block diagram of a dynamic image steganography device according to an exemplary embodiment. The apparatus shown in FIG. 12 can be applied to, for example, the server side of the above-mentioned system, and can also be applied to the terminal device of the above-mentioned system.
参考图12,本申请实施例提供的动态图像隐写装置120可以包括索引图像获得模块1202、索引值修改模块1204、第一像素值获得模块1206、第二像素值获得模块1208、失真代价获得模块1210、隐写索引矩阵获得模块1212和隐写图像获得模块1214。Referring to FIG. 12 , the dynamic image steganography apparatus 120 provided by the embodiment of the present application may include an index image obtaining module 1202 , an index value modification module 1204 , a first pixel value obtaining module 1206 , a second pixel value obtaining module 1208 , and a distortion cost obtaining module 1210 , a steganographic index matrix obtaining module 1212 and a steganographic image obtaining module 1214 .
索引图像获得模块1202可用于获得多帧载体图像中各帧载体图像的彩色索引图像,多帧载体图像从动态图像中获得,彩色索引图像包括索引矩阵和调色板。The index image obtaining module 1202 can be used to obtain a color index image of each frame of the carrier image in the multi-frame carrier image, and the multi-frame carrier image is obtained from a dynamic image, and the color index image includes an index matrix and a color palette.
索引值修改模块1204可用于对索引矩阵中的各个值进行修改,获得修改索引矩阵。The index value modification module 1204 may be configured to modify each value in the index matrix to obtain a modified index matrix.
第一像素值获得模块1206可用于根据索引矩阵索引调色板,获得各帧载体图像的各通道的像素值。The first pixel value obtaining module 1206 may be configured to index the palette according to the index matrix to obtain the pixel value of each channel of each frame of carrier image.
第二像素值获得模块1208可用于根据修改索引矩阵索引调色板,获得各帧载体图像的各通道的修改像素值。The second pixel value obtaining module 1208 may be configured to index the palette according to the modified index matrix to obtain the modified pixel value of each channel of each frame of carrier image.
失真代价获得模块1210可用于根据各帧载体图像的各通道的像素值和各帧载体图像的各通道的修改像素值获得各帧载体图像的失真代价矩阵。The distortion cost obtaining module 1210 may be configured to obtain a distortion cost matrix of each frame of carrier image according to the pixel value of each channel of each frame of carrier image and the modified pixel value of each frame of carrier image.
隐写索引矩阵获得模块1212可用于基于各帧载体图像的失真代价矩阵将待隐写信息嵌入索引矩阵,获得各帧载体图像的隐写索引矩阵。The steganographic index matrix obtaining module 1212 can be configured to embed the information to be steganographic into the index matrix based on the distortion cost matrix of the carrier image of each frame, and obtain the steganographic index matrix of the carrier image of each frame.
隐写图像获得模块1214可用于根据各帧载体图像的隐写索引矩阵和各帧载体图像的调色板获得多帧隐写图像,以合成动态隐写图像。The steganographic image obtaining module 1214 can be configured to obtain multiple frames of steganographic images according to the steganographic index matrix of each frame of carrier image and the palette of each frame of carrier image, so as to synthesize dynamic steganographic images.
图13是根据一示例性实施例示出的一种动态图像隐写装置的框图。如图13所示的装置例如可以应用于上述系统的服务器端,也可以应用于上述系统的终端设备。Fig. 13 is a block diagram of a dynamic image steganography device according to an exemplary embodiment. The apparatus shown in FIG. 13 can be applied to, for example, the server side of the above-mentioned system, and can also be applied to the terminal device of the above-mentioned system.
参考图13,本申请实施例提供的动态图像隐写装置130可以包括索引图像获得模块1302、当前载体图像获得模块13032、前一帧载体图像获得模块13034和灰度转换模块13036、索引值修改模块1304、二值化处理模块13052、边界提取模块13054、真边界值获取模块13056、预设失真值获取模块13058、第一像素值获得模块1306、第二像素值获得模块1308、高通滤波模块13092、通道失真代价计算模块13094、失真代价获得模块1310、隐写索引矩阵获得模块1312和隐写图像获得模块1314,其中,索引图像获得模块1302可以包括初始索引图像获得模块13022、调色板更新模块13024和索引矩阵更新模块13026,失真代价获得模块1310可以包括像素作差模块13102、图像失真代价计算模块13104、像素变化计算模块13106、失真代价值计算模块13108、失真代价矩阵计算模块13110、亮度变化量计算模块13112、亮度变化阈值获得模块13114、失真代价权重获得模块13116。13 , the dynamic image steganography device 130 provided by the embodiment of the present application may include an index image obtaining module 1302, a current carrier image obtaining module 13032, a previous frame carrier image obtaining module 13034, a grayscale conversion module 13036, and an index value modification module 1304, binarization processing module 13052, boundary extraction module 13054, true boundary value acquisition module 13056, preset distortion value acquisition module 13058, first pixel value acquisition module 1306, second pixel value acquisition module 1308, high-pass filter module 13092, A channel distortion cost calculation module 13094, a distortion cost acquisition module 1310, a steganographic index matrix acquisition module 1312, and a steganographic image acquisition module 1314, wherein the index image acquisition module 1302 may include an initial index image acquisition module 13022, a palette update module 13024 and the index matrix update module 13026, the distortion cost obtaining module 1310 may include a pixel difference module 13102, an image distortion cost calculation module 13104, a pixel change calculation module 13106, a distortion cost value calculation module 13108, a distortion cost matrix calculation module 13110, a brightness change amount A calculation module 13112 , a brightness change threshold obtaining module 13114 , and a distortion cost weight obtaining module 13116 .
索引图像获得模块1302可用于获得多帧载体图像中各帧载体图像的彩色索引图像,多帧载体图像从动态图像中获得,彩色索引图像包括索引矩阵和调色板。The index image obtaining module 1302 can be used to obtain a color index image of each frame of the carrier image in the multi-frame carrier image, and the multi-frame carrier image is obtained from a dynamic image, and the color index image includes an index matrix and a color palette.
初始索引图像获得模块13022可用于获取各帧载体图像的初始索引矩阵和初始调色板。The initial index image obtaining module 13022 can be used to obtain the initial index matrix and initial color palette of each frame of carrier image.
当前载体图像获得模块13032可用于获取当前帧载体图像的彩色索引图像,当前帧载体图像为多帧载体图像中第一帧载体图像之后的任意一帧。The current carrier image obtaining module 13032 can be configured to acquire the color index image of the carrier image of the current frame, where the carrier image of the current frame is any frame after the carrier image of the first frame of the carrier images of the multiple frames.
前一帧载体图像获得模块13034可用于获取当前帧载体图像的前一帧载体图像的彩色索引图像。The previous frame carrier image obtaining module 13034 may be configured to acquire the color index image of the previous frame carrier image of the current frame carrier image.
灰度转换模块13036可用于对当前帧载体图像的彩色索引图像进行灰度转换,获得当前帧载体图像的灰度图;对前一帧隐写图像的彩色索引图像进行灰度转换,获得前一帧载体图像的灰度 图。The grayscale conversion module 13036 can be used to perform grayscale conversion on the color index image of the carrier image of the current frame to obtain the grayscale image of the carrier image of the current frame; perform grayscale conversion on the color index image of the steganographic image of the previous frame to obtain the previous frame. Grayscale image of the frame vector image.
调色板更新模块13024可用于将各帧载体图像的初始调色板按照各通道值的平方和重新排序,获得各帧载体图像的调色板。The palette updating module 13024 may be configured to reorder the initial palettes of the carrier images of each frame according to the sum of the squares of the values of each channel to obtain the palette of the carrier images of each frame.
索引矩阵更新模块13026可用于根据各帧载体图像的初始索引矩阵、初始调色板、以及调色板获得各帧载体图像的索引矩阵。The index matrix updating module 13026 may be configured to obtain the index matrix of each frame carrier image according to the initial index matrix, the initial palette, and the palette of each frame carrier image.
索引值修改模块1304可用于对索引矩阵中的各个值进行修改,获得修改索引矩阵。The index value modification module 1304 may be configured to modify each value in the index matrix to obtain a modified index matrix.
二值化处理模块13052可用于对各帧载体图像的彩色索引图像进行二值化处理,获得各帧载体图像的二值图像。The binarization processing module 13052 can be used to perform binarization processing on the color index images of the carrier images of each frame to obtain the binary images of the carrier images of each frame.
边界提取模块13054可用于提取各帧载体图像的二值图像的边界信息,获得各帧载体图像的各像素的边界信息值。The boundary extraction module 13054 can be used to extract the boundary information of the binary image of each frame of carrier image, and obtain the boundary information value of each pixel of each frame of carrier image.
真边界值获取模块13056可用于获取真边界值。The true boundary value acquisition module 13056 may be used to obtain the true boundary value.
预设失真值获取模块13058可用于获取预设失真值。The preset distortion value obtaining module 13058 can be used to obtain the preset distortion value.
第一像素值获得模块1306可用于根据索引矩阵索引调色板,获得各帧载体图像的各通道的像素值。The first pixel value obtaining module 1306 may be configured to index the palette according to the index matrix to obtain the pixel value of each channel of each frame of carrier image.
第二像素值获得模块1308可用于根据修改索引矩阵索引调色板,获得各帧载体图像的各通道的修改像素值。The second pixel value obtaining module 1308 may be configured to index the palette according to the modified index matrix to obtain the modified pixel value of each channel of each frame of carrier image.
高通滤波模块13092可用于对于各帧载体图像的各通道,采用高通滤波器对各通道像素进行滤波后取滤波结果的绝对值。The high-pass filtering module 13092 can be used to filter the pixels of each channel with a high-pass filter for each channel of the carrier image of each frame, and then obtain the absolute value of the filtering result.
通道失真代价计算模块13094可用于采用低通滤波器对滤波结果的绝对值进行平滑获得最终残差后取倒数,分别获得各帧载体图像的各通道的失真代价值。The channel distortion cost calculation module 13094 can be configured to use a low-pass filter to smooth the absolute value of the filtering result to obtain the final residual, and then take the reciprocal to obtain the distortion cost value of each channel of each frame of carrier image.
失真代价获得模块1310可用于根据各帧载体图像的各通道的像素值和各帧载体图像的各通道的修改像素值获得各帧载体图像的失真代价矩阵。The distortion cost obtaining module 1310 may be configured to obtain a distortion cost matrix of each frame of carrier image according to the pixel value of each channel of each frame of carrier image and the modified pixel value of each frame of carrier image.
像素作差模块13102可用于分别获得各帧载体图像的各通道的像素值与修改像素值的差。The pixel difference module 13102 can be used to obtain the difference between the pixel value of each channel of the carrier image of each frame and the modified pixel value.
图像失真代价计算模块13104可用于根据各帧载体图像的各通道的像素值与修改像素值的差以及各帧载体图像的各通道的失真代价值获得各帧载体图像的失真代价矩阵。The image distortion cost calculation module 13104 may be configured to obtain a distortion cost matrix of each frame of carrier image according to the difference between the pixel value of each channel of each frame of carrier image and the modified pixel value and the distortion cost value of each channel of each frame of carrier image.
像素变化计算模块13106可用于获得各帧载体图像的各通道的像素值与修改像素值的差的平方和。The pixel change calculation module 13106 can be used to obtain the sum of squares of the difference between the pixel value of each channel of the carrier image of each frame and the difference of the modified pixel value.
失真代价值计算模块13108可用于对各帧载体图像的各通道的失真代价值求平均获得各帧载体图像的总失真代价值。The distortion cost value calculation module 13108 may be configured to average the distortion cost values of each channel of each frame of carrier image to obtain the total distortion cost value of each frame of carrier image.
失真代价矩阵计算模块13110可用于将各帧载体图像的总失真代价值与各通道的像素值与修改像素值的差的平方和相乘,获得各帧载体图像的失真代价矩阵。The distortion cost matrix calculation module 13110 can be configured to multiply the total distortion cost value of each frame of carrier image and the sum of squares of the difference between the pixel value of each channel and the modified pixel value to obtain the distortion cost matrix of each frame of carrier image.
亮度变化量计算模块13112可用于将当前帧载体图像的灰度图与前一帧载体图像的灰度图作差后求平方,获得当前帧载体图像中各像素的亮度变化量。The luminance variation calculation module 13112 can be used to square the difference between the grayscale image of the carrier image of the current frame and the grayscale image of the carrier image of the previous frame to obtain the luminance variation of each pixel in the carrier image of the current frame.
亮度变化阈值获得模块13114可用于获得亮度变化阈值。The brightness change threshold obtaining module 13114 may be used to obtain the brightness change threshold.
失真代价矩阵计算模块13110还可用于在当前帧载体图像中一像素的亮度变化量大于亮度变化阈值时,将当前帧载体图像的总失真代价值与该像素各通道的像素值与修改像素值的差的平方和相乘,获得该像素的颜色改变量,以获得各帧载体图像的失真代价矩阵。The distortion cost matrix calculation module 13110 can also be used to calculate the difference between the total distortion cost value of the current frame carrier image and the pixel value of each channel of the pixel and the modified pixel value when the luminance variation of a pixel in the current frame carrier image is greater than the luminance variation threshold. Multiply the sum of the squares of the differences to obtain the color change amount of the pixel to obtain the distortion cost matrix of each frame of the carrier image.
失真代价权重获得模块13116可用于获得失真代价权重,失真代价权重为大于1的值。The distortion cost weight obtaining module 13116 can be used to obtain the distortion cost weight, and the distortion cost weight is a value greater than 1.
失真代价矩阵计算模块13110还可用于在当前帧载体图像中一像素的亮度变化量不大于亮度变化阈值时,将当前帧载体图像的总失真代价值与该像素各通道的像素值与修改像素值的差的平方和相乘后再乘以失真代价权重,获得该像素的颜色改变量,以获得各帧载体图像的失真代价矩阵。The distortion cost matrix calculation module 13110 can also be used to calculate the total distortion cost value of the current frame carrier image and the pixel value of each channel of the pixel and the modified pixel value when the luminance variation of a pixel in the current frame carrier image is not greater than the luminance variation threshold. Multiply the squared sum of the difference and then multiply it by the distortion cost weight to obtain the color change amount of the pixel to obtain the distortion cost matrix of each frame of carrier image.
失真代价矩阵计算模块13110还可用于对于各帧载体图像的各像素,在该像素的边界信息值等于真边界值时,根据该像素的各通道的像素值和修改像素值获得该像素的失真代价,以获得各帧载体图像的失真代价矩阵。The distortion cost matrix calculation module 13110 can also be used to obtain the distortion cost of the pixel according to the pixel value of each channel of the pixel and the modified pixel value when the boundary information value of the pixel is equal to the true boundary value for each pixel of each frame of the carrier image. , to obtain the distortion cost matrix of each frame carrier image.
失真代价矩阵计算模块13110还可用于对于各帧载体图像的各像素,在该像素的边界信息值不等于真边界值时,获得该像素的失真代价为预设失真值,以获得各帧载体图像的失真代价矩阵。The distortion cost matrix calculation module 13110 can also be used for each pixel of each frame of the carrier image, when the boundary information value of the pixel is not equal to the true boundary value, the distortion cost of the pixel is obtained as the preset distortion value, so as to obtain each frame of the carrier image. The distortion cost matrix of .
隐写索引矩阵获得模块1312可用于基于各帧载体图像的失真代价矩阵将待隐写信息嵌入索引矩阵,获得各帧载体图像的隐写索引矩阵。The steganographic index matrix obtaining module 1312 can be configured to embed the information to be steganographic into the index matrix based on the distortion cost matrix of the carrier image of each frame, and obtain the steganographic index matrix of the carrier image of each frame.
隐写图像获得模块1314可用于根据各帧载体图像的隐写索引矩阵和各帧载体图像的调色板获得多帧隐写图像,以合成动态隐写图像。The steganographic image obtaining module 1314 can be configured to obtain multiple frames of steganographic images according to the steganographic index matrix of each frame of carrier image and the palette of each frame of carrier image, so as to synthesize dynamic steganographic images.
本申请实施例提供的装置中的各个模块的具体实现可以参照上述方法中的内容,此处不再赘述。For the specific implementation of each module in the apparatus provided in the embodiment of the present application, reference may be made to the content in the foregoing method, and details are not repeated here.
图14示出本申请实施例中一种电子设备的结构示意图。需要说明的是,图14示出的设备仅以计算机系统为示例,不应对本申请实施例的功能和使用范围带来任何限制。FIG. 14 shows a schematic structural diagram of an electronic device in an embodiment of the present application. It should be noted that the device shown in FIG. 14 is only an example of a computer system, and should not impose any limitations on the functions and scope of use of the embodiments of the present application.
如图14所示,设备1400包括中央处理单元(CPU)1401,其可以根据存储在只读存储器(ROM)1402中的程序或者从存储部分1408加载到随机访问存储器(RAM)1403中的程序而执行各种适当的动作和处理。在RAM 1403中,还存储有设备1400操作所需的各种程序和数据。CPU1401、 ROM 1402以及RAM 1403通过总线1404彼此相连。输入/输出(I/O)接口1405也连接至总线1404。As shown in FIG. 14, the apparatus 1400 includes a central processing unit (CPU) 1401, which can be processed according to a program stored in a read only memory (ROM) 1402 or a program loaded into a random access memory (RAM) 1403 from a storage section 1408 Various appropriate actions and processes are performed. In the RAM 1403, various programs and data required for the operation of the device 1400 are also stored. The CPU 1401, the ROM 1402, and the RAM 1403 are connected to each other through a bus 1404. An input/output (I/O) interface 1405 is also connected to bus 1404 .
以下部件连接至I/O接口1405:包括键盘、鼠标等的输入部分1406;包括诸如阴极射线管(CRT)、液晶显示器(LCD)等以及扬声器等的输出部分1407;包括硬盘等的存储部分1408;以及包括诸如LAN卡、调制解调器等的网络接口卡的通信部分1409。通信部分1409经由诸如因特网的网络执行通信处理。驱动器1414也根据需要连接至I/O接口1405。可拆卸介质1411,诸如磁盘、光盘、磁光盘、半导体存储器等等,根据需要安装在驱动器1414上,以便于从其上读出的计算机程序根据需要被安装入存储部分1408。The following components are connected to the I/O interface 1405: an input section 1406 including a keyboard, a mouse, etc.; an output section 1407 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1408 including a hard disk, etc. ; and a communication section 1409 including a network interface card such as a LAN card, a modem, and the like. The communication section 1409 performs communication processing via a network such as the Internet. Drivers 1414 are also connected to I/O interface 1405 as needed. A removable medium 1411, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is mounted on the drive 1414 as needed so that a computer program read therefrom is installed into the storage section 1408 as needed.
特别地,根据本申请的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本申请的实施例包括一种计算机程序产品,其包括承载在计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信部分1409从网络上被下载和安装,和/或从可拆卸介质1411被安装。在该计算机程序被中央处理单元(CPU)1401执行时,执行本申请的系统中限定的上述功能。In particular, according to embodiments of the present application, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the method illustrated in the flowchart. In such an embodiment, the computer program may be downloaded and installed from the network via the communication portion 1409, and/or installed from the removable medium 1411. When the computer program is executed by the central processing unit (CPU) 1401, the above-described functions defined in the system of the present application are executed.
需要说明的是,本申请所示的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是,但不限于:电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本申请中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本申请中,计算机可读的信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读的信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:无线、电线、光缆、RF等等,或者上述的任意合适的组合。It should be noted that the computer-readable medium shown in this application may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the above two. The computer readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any combination of the above. More specific examples of computer readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer disks, hard disks, random access memory (RAM), read only memory (ROM), erasable Programmable read only memory (EPROM or flash memory), fiber optics, portable compact disk read only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing. In this application, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this application, however, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code therein. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device . Program code embodied on a computer readable medium may be transmitted using any suitable medium including, but not limited to, wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
附图中的流程图和框图,图示了按照本申请各种实施例的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,上述模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图或流程图中的每个方框、以及框图或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。The flowchart and block diagrams in the Figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code that contains one or more logical functions for implementing the specified functions executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the blocks may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It is also noted that each block of the block diagrams or flowchart illustrations, and combinations of blocks in the block diagrams or flowchart illustrations, can be implemented in special purpose hardware-based systems that perform the specified functions or operations, or can be implemented using A combination of dedicated hardware and computer instructions is implemented.
描述于本申请实施例中所涉及到的模块可以通过软件的方式实现,也可以通过硬件的方式来实现。所描述的模块也可以设置在处理器中,例如,可以描述为:一种处理器包括索引图像获得模块、索引值修改模块、第一像素值获得模块、第二像素值获得模块、失真代价获得模块、隐写索引矩阵获得模块和隐写图像获得模块。其中,这些模块的名称在某种情况下并不构成对该模块本身的限定,例如,索引图像获得模块还可以被描述为“从动态载体图像中获取多帧载体图像的彩色索引图像的模块”。The modules involved in the embodiments of the present application may be implemented in a software manner, and may also be implemented in a hardware manner. The described module can also be set in the processor, for example, it can be described as: a processor includes an index image obtaining module, an index value modification module, a first pixel value obtaining module, a second pixel value obtaining module, and a distortion cost obtaining module. module, steganographic index matrix obtaining module and steganographic image obtaining module. Among them, the names of these modules do not constitute a limitation of the module itself under certain circumstances. For example, the index image acquisition module can also be described as "a module for obtaining color index images of multiple frames of carrier images from dynamic carrier images". .
作为另一方面,本申请还提供了一种计算机可读介质,该计算机可读介质可以是上述实施例中描述的设备中所包含的;也可以是单独存在,而未装配入该设备中。上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被一个该设备执行时,使得该设备包括:As another aspect, the present application also provides a computer-readable medium. The computer-readable medium may be included in the device described in the above embodiments, or may exist alone without being assembled into the device. The above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by a device, the device includes:
获得多帧载体图像中各帧载体图像的彩色索引图像,多帧载体图像从动态图像中获得,彩色索引图像包括索引矩阵和调色板;对索引矩阵中的各个值进行修改,获得修改索引矩阵;根据索引矩阵索引调色板,获得各帧载体图像的各通道的像素值;根据修改索引矩阵索引调色板,获得各帧载体图像的各通道的修改像素值;根据各帧载体图像的各通道的像素值和各帧载体图像的各通道的修改像素值获得各帧载体图像的失真代价矩阵;基于各帧载体图像的失真代价矩阵将待隐写信息嵌入索引矩阵,获得各帧载体图像的隐写索引矩阵;根据各帧载体图像的隐写索引矩阵和各帧载体图像的调色板获得多帧隐写图像,以合成动态隐写图像。Obtain the color index image of each frame of the carrier image in the multi-frame carrier image, the multi-frame carrier image is obtained from the dynamic image, and the color index image includes an index matrix and a palette; modify each value in the index matrix to obtain a modified index matrix ; According to the index matrix index palette, obtain the pixel value of each channel of each frame carrier image; According to the modified index matrix index palette, obtain the modified pixel value of each channel of each frame carrier image; According to each frame carrier image The pixel value of the channel and the modified pixel value of each channel of the carrier image of each frame obtain the distortion cost matrix of the carrier image of each frame; based on the distortion cost matrix of the carrier image of each frame, the information to be steganographic is embedded in the index matrix to obtain the carrier image of each frame. Steganographic index matrix; according to the steganographic index matrix of each frame of carrier image and the palette of each frame of carrier image, multiple frames of steganographic images are obtained to synthesize dynamic steganographic images.
以上具体地示出和描述了本申请的示例性实施例。应可理解的是,本申请不限于这里描述的详细结构、设置方式或实现方法;相反,本申请意图涵盖包含在所附权利要求的精神和范围内的各种修改和等效设置。Exemplary embodiments of the present application have been specifically shown and described above. It should be understood that this application is not limited to the details of construction, arrangements, or implementations described herein; on the contrary, this application is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.

Claims (10)

  1. 一种动态图像隐写方法,其特征在于,包括:A dynamic image steganography method, comprising:
    获得多帧载体图像中各帧载体图像的彩色索引图像,所述多帧载体图像从所述动态图像中获得,所述彩色索引图像包括索引矩阵和调色板;obtaining a color indexed image of each frame of carrier image in a multi-frame carrier image obtained from the dynamic image, the color indexed image comprising an index matrix and a palette;
    对所述索引矩阵中的各个值进行修改,获得修改索引矩阵;Modify each value in the index matrix to obtain a modified index matrix;
    根据所述索引矩阵索引所述调色板,获得各帧载体图像的各通道的像素值;Index the palette according to the index matrix to obtain the pixel value of each channel of each frame of carrier image;
    根据所述修改索引矩阵索引所述调色板,获得各帧载体图像的各通道的修改像素值;Index the palette according to the modified index matrix to obtain the modified pixel value of each channel of each frame of carrier image;
    根据所述各帧载体图像的各通道的像素值和所述各帧载体图像的各通道的修改像素值获得各帧载体图像的失真代价矩阵;Obtain the distortion cost matrix of each frame of carrier image according to the pixel value of each channel of each frame of carrier image and the modified pixel value of each channel of each frame of carrier image;
    基于所述各帧载体图像的失真代价矩阵将待隐写信息嵌入所述索引矩阵,获得各帧载体图像的隐写索引矩阵;Embedding the information to be steganographic into the index matrix based on the distortion cost matrix of the carrier image of each frame, to obtain the steganographic index matrix of the carrier image of each frame;
    根据所述各帧载体图像的隐写索引矩阵和所述各帧载体图像的调色板获得多帧隐写图像,以合成动态隐写图像。Multiple frames of steganographic images are obtained according to the steganographic index matrix of the carrier images of each frame and the palette of the carrier images of each frame to synthesize dynamic steganographic images.
  2. 根据权利要求1所述的方法,其特征在于,还包括:The method of claim 1, further comprising:
    对于各帧载体图像的各通道,采用高通滤波器对各通道像素进行滤波后取滤波结果的绝对值;For each channel of each frame of the carrier image, a high-pass filter is used to filter the pixels of each channel, and then the absolute value of the filtering result is obtained;
    采用低通滤波器对所述滤波结果的绝对值进行平滑获得最终残差后取倒数,分别获得各帧载体图像的各通道的失真代价值;Use a low-pass filter to smooth the absolute value of the filtering result to obtain the final residual, and then take the reciprocal to obtain the distortion cost value of each channel of each frame of the carrier image;
    所述根据所述各帧载体图像的各通道的像素值和所述各帧载体图像的各通道的修改像素值获得各帧载体图像的失真代价矩阵包括:The obtaining of the distortion cost matrix of each frame of carrier image according to the pixel value of each channel of each frame of carrier image and the modified pixel value of each channel of each frame of carrier image includes:
    分别获得各帧载体图像的各通道的像素值与修改像素值的差;Obtain the difference between the pixel value of each channel of the carrier image of each frame and the modified pixel value;
    根据所述各帧载体图像的各通道的像素值与修改像素值的差以及所述各帧载体图像的各通道的失真代价值获得所述各帧载体图像的失真代价矩阵。The distortion cost matrix of each frame of carrier image is obtained according to the difference between the pixel value of each frame of carrier image and the modified pixel value and the distortion cost value of each channel of each frame of carrier image.
  3. 根据权利要求2所述的方法,其特征在于,所述获得多帧载体图像中各帧载体图像的彩色索引图像包括:The method according to claim 2, wherein the obtaining a color index image of each frame of carrier images in the multi-frame carrier images comprises:
    获取各帧载体图像的初始索引矩阵和初始调色板;Obtain the initial index matrix and initial palette of each frame of carrier image;
    将所述各帧载体图像的初始调色板按照各通道值的平方和重新排序,获得各帧载体图像的调色板;reordering the initial palette of the carrier images of each frame according to the sum of the squares of the channel values to obtain the palette of the carrier images of each frame;
    根据各帧载体图像的初始索引矩阵、初始调色板、以及调色板获得各帧载体图像的索引矩阵;Obtain the index matrix of each frame carrier image according to the initial index matrix of each frame carrier image, the initial palette, and the palette;
    所述根据所述个帧载体图像的各通道的像素值与修改像素值的差以及所述各帧载体图像的各通道的失真代价值获得所述各帧载体图像的失真代价矩阵包括:Described according to the difference between the pixel value of each channel of the frame carrier image and the modified pixel value and the distortion cost value of each channel of the frame carrier image to obtain the distortion cost matrix of each frame carrier image includes:
    获得所述各帧载体图像的各通道的像素值与修改像素值的差的平方和;Obtain the square sum of the difference between the pixel value of each channel of the carrier image of each frame and the modified pixel value;
    对所述各帧载体图像的各通道的失真代价值求平均获得各帧载体图像的总失真代价值;The total distortion cost value of each frame of carrier image is obtained by averaging the distortion cost value of each channel of each frame of carrier image;
    将所述各帧载体图像的总失真代价值与各通道的像素值与修改像素值的差的平方和相乘,获得所述各帧载体图像的失真代价矩阵。Multiplying the total distortion cost value of each frame of carrier image and the sum of squares of the difference between the pixel value of each channel and the modified pixel value to obtain the distortion cost matrix of each frame of carrier image.
  4. 根据权利要求3所述的方法,其特征在于,还包括:The method of claim 3, further comprising:
    获取当前帧载体图像的彩色索引图像,所述当前帧载体图像为所述多帧载体图像中第一帧载体图像之后的任意一帧;Obtaining the color index image of the current frame carrier image, the current frame carrier image is any frame after the first frame carrier image in the multi-frame carrier images;
    对当前帧载体图像的彩色索引图像进行灰度转换,获得当前帧载体图像的灰度图;Perform grayscale conversion on the color index image of the current frame carrier image to obtain the grayscale image of the current frame carrier image;
    获取所述当前帧载体图像的前一帧载体图像的彩色索引图像;obtaining the color index image of the previous frame carrier image of the current frame carrier image;
    对前一帧隐写图像的彩色索引图像进行灰度转换,获得前一帧载体图像的灰度图;Perform grayscale conversion on the color index image of the steganographic image of the previous frame to obtain the grayscale image of the carrier image of the previous frame;
    所述将所述各帧载体图像的总失真代价值与各通道的像素值与修改像素值的差的平方和相乘,获得所述各帧载体图像的失真代价矩阵包括:Multiplying the total distortion cost value of each frame of carrier image by the sum of squares of the difference between the pixel value of each channel and the modified pixel value to obtain the distortion cost matrix of each frame of carrier image includes:
    将所述当前帧载体图像的灰度图与所述前一帧载体图像的灰度图作差后求平方,获得当前帧载体图像中各像素的亮度变化量;Square the grayscale image of the carrier image of the current frame and the grayscale image of the carrier image of the previous frame after making a difference, obtain the luminance variation of each pixel in the carrier image of the current frame;
    获得亮度变化阈值;Get the brightness change threshold;
    在所述当前帧载体图像中一像素的亮度变化量大于所述亮度变化阈值时,将所述当前帧载体图像的总失真代价值与该像素各通道的像素值与修改像素值的差的平方和相乘,获得该像素的颜色改变量,以获得所述各帧载体图像的失真代价矩阵。When the luminance change amount of a pixel in the current frame carrier image is greater than the luminance change threshold, the square of the difference between the total distortion cost value of the current frame carrier image and the pixel value of each channel of the pixel and the modified pixel value is calculated and multiplied to obtain the color change amount of the pixel, so as to obtain the distortion cost matrix of the carrier image of each frame.
  5. 根据权利要求3所述的方法,其特征在于,所述将所述各帧载体图像的总失真代价值与各通道的像素值与修改像素值的差的平方和相乘,获得所述各帧载体图像的失真代价矩阵包括:The method according to claim 3, wherein the total distortion cost value of the carrier image of each frame is multiplied by the square sum of the difference between the pixel value of each channel and the modified pixel value to obtain the frame The distortion cost matrix of the carrier image includes:
    获得亮度变化阈值;Get the brightness change threshold;
    获得失真代价权重,所述失真代价权重为大于1的值;obtaining a distortion cost weight, the distortion cost weight being a value greater than 1;
    在所述当前帧载体图像中一像素的亮度变化量不大于所述亮度变化阈值时,将所述当前帧载体图像的总失真代价值与该像素各通道的像素值与修改像素值的差的平方和相乘后再乘以所述失真代价权重,获得该像素的颜色改变量,以获得所述各帧载体图像的失真代价矩阵。When the amount of luminance change of a pixel in the carrier image of the current frame is not greater than the luminance change threshold, calculate the difference between the total distortion cost value of the carrier image of the current frame and the difference between the pixel value of each channel of the pixel and the modified pixel value The squared sum is multiplied and then multiplied by the distortion cost weight to obtain the color change amount of the pixel, so as to obtain the distortion cost matrix of the carrier image of each frame.
  6. 根据权利要求1至5中任意一项所述的方法,其特征在于,还包括:The method according to any one of claims 1 to 5, further comprising:
    对所述各帧载体图像的彩色索引图像进行二值化处理,获得各帧载体图像的二值图像;Perform binarization processing on the color index image of each frame of carrier image to obtain a binary image of each frame of carrier image;
    提取所述各帧载体图像的二值图像的边界信息,获得各帧载体图像的各像素的边界信息值;Extracting the boundary information of the binary image of each frame carrier image, and obtaining the boundary information value of each pixel of each frame carrier image;
    获取真边界值;Get the true boundary value;
    所述根据所述各帧载体图像的各通道的像素值和所述各帧载体图像的各通道的修改像素值获得各帧载体图像的失真代价矩阵包括:The obtaining of the distortion cost matrix of each frame of carrier image according to the pixel value of each channel of each frame of carrier image and the modified pixel value of each channel of each frame of carrier image includes:
    对于各帧载体图像的各像素,在该像素的边界信息值等于所述真边界值时,根据该像素的各通道的像素值和修改像素值获得该像素的失真代价,以获得所述各帧载体图像的失真代价矩阵。For each pixel of the carrier image of each frame, when the boundary information value of the pixel is equal to the true boundary value, the distortion cost of the pixel is obtained according to the pixel value of each channel of the pixel and the modified pixel value, so as to obtain the frame. Distortion cost matrix for the carrier image.
  7. 根据权利要求6所述的方法,其特征在于,还包括:The method of claim 6, further comprising:
    获取预设失真值;Get the preset distortion value;
    所述根据所述各帧载体图像的各通道的像素值和所述各帧载体图像的各通道的修改像素值获得各帧载体图像的失真代价矩阵还包括:The obtaining the distortion cost matrix of each frame of carrier image according to the pixel value of each channel of each frame of carrier image and the modified pixel value of each channel of each frame of carrier image further includes:
    对于各帧载体图像的各像素,在该像素的边界信息值不等于所述真边界值时,获得该像素的失真代价为所述预设失真值,以获得所述各帧载体图像的失真代价矩阵。For each pixel of the carrier image of each frame, when the boundary information value of the pixel is not equal to the true boundary value, the distortion cost of the pixel obtained is the preset distortion value, so as to obtain the distortion cost of the carrier image of each frame matrix.
  8. 一种动态图像隐写装置,其特征在于,包括:A dynamic image steganography device, comprising:
    索引图像获得模块,用于获得多帧载体图像中各帧载体图像的彩色索引图像,所述多帧载体图像从所述动态图像中获得,所述彩色索引图像包括索引矩阵和调色板;an index image obtaining module, configured to obtain a color index image of each frame of carrier images in the multi-frame carrier images, the multi-frame carrier images are obtained from the dynamic image, and the color index images include an index matrix and a palette;
    索引值修改模块,用于对所述索引矩阵中的各个值进行修改,获得修改索引矩阵;an index value modification module for modifying each value in the index matrix to obtain a modified index matrix;
    第一像素值获得模块,用于根据所述索引矩阵索引所述调色板,获得各帧载体图像的各通道的像素值;a first pixel value obtaining module, configured to index the palette according to the index matrix to obtain the pixel value of each channel of each frame of carrier image;
    第二像素值获得模块,用于根据所述修改索引矩阵索引所述调色板,获得各帧载体图像的各通道的修改像素值;A second pixel value obtaining module, configured to index the palette according to the modified index matrix, to obtain the modified pixel value of each channel of each frame of carrier image;
    失真代价获得模块,用于根据所述各帧载体图像的各通道的像素值和所述各帧载体图像的各通道的修改像素值获得各帧载体图像的失真代价矩阵;a distortion cost obtaining module, configured to obtain a distortion cost matrix of each frame of the carrier image according to the pixel value of each channel of the each frame of carrier image and the modified pixel value of each channel of the each frame of carrier image;
    隐写索引矩阵获得模块,用于基于所述各帧载体图像的失真代价矩阵将待隐写信息嵌入所述索引矩阵,获得各帧载体图像的隐写索引矩阵;a steganographic index matrix obtaining module, used for embedding the information to be steganographic into the index matrix based on the distortion cost matrix of the carrier images of each frame, to obtain the steganographic index matrix of the carrier images of each frame;
    隐写图像获得模块,用于根据所述各帧载体图像的隐写索引矩阵和所述各帧载体图像的调色板获得多帧隐写图像,以合成动态隐写图像。The steganographic image obtaining module is configured to obtain multiple frames of steganographic images according to the steganographic index matrix of the carrier images of each frame and the palette of the carrier images of each frame, so as to synthesize dynamic steganographic images.
  9. 一种设备,包括:存储器、处理器及存储在所述存储器中并可在所述处理器中运行的可执行指令,其特征在于,所述处理器执行所述可执行指令时实现如权利要求1至7中任一项所述的方法。A device, comprising: a memory, a processor, and executable instructions stored in the memory and executable in the processor, characterized in that, when the processor executes the executable instructions, the implementation as claimed in the claims The method of any one of 1 to 7.
  10. 一种计算机可读存储介质,其上存储有计算机可执行指令,其特征在于,所述可执行指令被处理器执行时实现如权利要求1至7中任一项所述的方法。A computer-readable storage medium on which computer-executable instructions are stored, characterized in that, when the executable instructions are executed by a processor, the method according to any one of claims 1 to 7 is implemented.
PCT/CN2021/141728 2021-03-23 2021-12-27 Method for dynamic image steganography, apparatus, device, and storage medium WO2022199180A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110309029.8A CN115115497A (en) 2021-03-23 2021-03-23 Dynamic image steganography method, device, equipment and storage medium
CN202110309029.8 2021-03-23

Publications (1)

Publication Number Publication Date
WO2022199180A1 true WO2022199180A1 (en) 2022-09-29

Family

ID=83324042

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/141728 WO2022199180A1 (en) 2021-03-23 2021-12-27 Method for dynamic image steganography, apparatus, device, and storage medium

Country Status (2)

Country Link
CN (1) CN115115497A (en)
WO (1) WO2022199180A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6021196A (en) * 1998-05-26 2000-02-01 The Regents University Of California Reference palette embedding
CN1725868A (en) * 2005-07-14 2006-01-25 上海交通大学 Method for detecting GIF infomration hidden
CN109410116A (en) * 2018-11-02 2019-03-01 江苏亿鸿信息工程有限公司 Information hiding and extracting method towards animated image
CN109964204A (en) * 2017-10-19 2019-07-02 腾讯科技(深圳)有限公司 For handling the method and system of figure

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6021196A (en) * 1998-05-26 2000-02-01 The Regents University Of California Reference palette embedding
CN1725868A (en) * 2005-07-14 2006-01-25 上海交通大学 Method for detecting GIF infomration hidden
CN109964204A (en) * 2017-10-19 2019-07-02 腾讯科技(深圳)有限公司 For handling the method and system of figure
CN109410116A (en) * 2018-11-02 2019-03-01 江苏亿鸿信息工程有限公司 Information hiding and extracting method towards animated image

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
LIN JINGZHI, QIAN ZHENXING, WANG ZICHI, ZHANG XINPENG, FENG GUORUI: "A New Steganography Method for Dynamic GIF Images Based on Palette Sort", WIRELESS COMMUNICATIONS AND MOBILE COMPUTING, JOHN WILEY & SONS, vol. 2020, 28 August 2020 (2020-08-28), pages 1 - 13, XP055969450, ISSN: 1530-8669, DOI: 10.1155/2020/8812087 *

Also Published As

Publication number Publication date
CN115115497A (en) 2022-09-27

Similar Documents

Publication Publication Date Title
CN107633218B (en) Method and apparatus for generating image
CN112419151B (en) Image degradation processing method and device, storage medium and electronic equipment
US20190132546A1 (en) System and Method of Luminance Processing in High Dynamic Range and Standard Dynamic Range Conversion
WO2019041842A1 (en) Image processing method and device, storage medium and computer device
CN108235055B (en) Method and device for realizing transparent video in AR scene
US10853917B2 (en) Color image authentication method based on palette compression technique
US11627281B2 (en) Method and apparatus for video frame interpolation, and device and storage medium
CN111080655A (en) Image segmentation and model training method, device, medium and electronic equipment
CN110852980A (en) Interactive image filling method and system, server, device and medium
CN113421312A (en) Method and device for coloring black and white video, storage medium and terminal
CN107113464B (en) Content providing apparatus, display apparatus, and control method thereof
Liu et al. JPEG robust invertible grayscale
CN108924557B (en) Image processing method, image processing device, electronic equipment and storage medium
WO2022199180A1 (en) Method for dynamic image steganography, apparatus, device, and storage medium
CN117556394A (en) APP digital watermark generation method, decoding method, system, equipment and storage medium
JP6664409B2 (en) Adaptive color grade interpolation method and device
CN110443754B (en) Method for improving resolution of digital image
CN115082356B (en) Method, device and equipment for correcting video stream image based on shader
CN115953597B (en) Image processing method, device, equipment and medium
Noda et al. Colorization in YCbCr color space and its application to JPEG images
WO2020093769A1 (en) Method and device for embedding information in image
Tsai et al. A generalized image interpolation-based reversible data hiding scheme with high embedding capacity and image quality
CN112399027A (en) Picture encryption and decryption method and device, storage medium and electronic equipment
CN112215237B (en) Image processing method and device, electronic equipment and computer readable storage medium
US20210360236A1 (en) System and method for encoding a block-based volumetric video having a plurality of video frames of a 3d object into a 2d video format

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21932787

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21932787

Country of ref document: EP

Kind code of ref document: A1