CN115115497A - Dynamic image steganography method, device, equipment and storage medium - Google Patents

Dynamic image steganography method, device, equipment and storage medium Download PDF

Info

Publication number
CN115115497A
CN115115497A CN202110309029.8A CN202110309029A CN115115497A CN 115115497 A CN115115497 A CN 115115497A CN 202110309029 A CN202110309029 A CN 202110309029A CN 115115497 A CN115115497 A CN 115115497A
Authority
CN
China
Prior art keywords
frame
image
carrier image
carrier
value
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202110309029.8A
Other languages
Chinese (zh)
Inventor
万璐敏
黄璐璐
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tianyi Cloud Technology Co Ltd
Original Assignee
Tianyi Cloud Technology Co Ltd
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 Tianyi Cloud Technology Co Ltd filed Critical Tianyi Cloud Technology Co Ltd
Priority to CN202110309029.8A priority Critical patent/CN115115497A/en
Priority to PCT/CN2021/141728 priority patent/WO2022199180A1/en
Publication of CN115115497A publication Critical patent/CN115115497A/en
Pending legal-status Critical Current

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

Abstract

The present disclosure provides a dynamic image steganography method, apparatus, device and storage medium, the method comprising: obtaining a color index image including an index matrix and a color palette of each frame of carrier image in a plurality of frames of carrier images obtained from a dynamic image; modifying each value in the index matrix to obtain a modified index matrix; obtaining the pixel value of each channel of each frame of carrier image according to the index matrix index palette; obtaining a modified pixel value of each channel of each frame of carrier image according to the modified index matrix index palette; obtaining 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 channel of each frame of carrier image; embedding the information to be steganographically into an index matrix based on the distortion cost matrix of each frame of carrier image to obtain a steganographically-indexed matrix of each frame of carrier image; and obtaining a plurality of frames of steganographic images according to the steganographic index matrix of each frame of carrier image and the color palette of each frame of carrier image to synthesize a dynamic steganographic image.

Description

Dynamic image steganography method, device, equipment and storage medium
Technical Field
The present disclosure relates to the field of information security technologies, and in particular, to a dynamic image steganography method, apparatus, device, and readable storage medium.
Background
The steganography technology is an important branch of the technical field of information hiding, and the aim of hidden communication can be achieved by embedding secret information into files such as images, audios, videos, texts and the like. The image has the characteristics of universality, easy acquirement, sufficient redundant data and the like, and the image steganography technology taking the image as an information hiding carrier is one of the research focuses in the field. The image steganography method in the related art is proposed on a static image, and is only suitable for true color images, and no steganography method based on dynamic index images exists.
As described above, how to provide a dynamic index image-based steganography method becomes 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 disclosure 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.
Disclosure of Invention
The present disclosure is directed to a dynamic image steganography method, apparatus, device and readable storage medium, which at least to some extent overcome the problem in the related art that the steganography method for a static image is not suitable for a dynamic index image.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows, or in part will be obvious from the description, or may be learned by practice of the disclosure.
According to an aspect of the present disclosure, there is provided a dynamic image steganography method including: obtaining a color index image of each frame of carrier image in a plurality of frames of carrier images, wherein the plurality of frames of carrier images are obtained from the dynamic image, and the color index image comprises an index matrix and a color palette; modifying each value in the index matrix to obtain a modified index matrix; indexing the palette according to the index matrix to obtain pixel values of each channel of each frame of carrier image; indexing the color palette according to the modification index matrix to obtain modified pixel values of each channel of each frame of carrier image; obtaining 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 channel of each frame of carrier image; embedding the information to be steganographically into the index matrix based on the distortion cost matrix of each frame of carrier image to obtain the steganographically-indexed matrix of each frame of carrier image; and obtaining a plurality of frames of steganographic images according to the steganographic index matrix of each frame of carrier image and the color palette of each frame of carrier image so as to synthesize a dynamic steganographic image.
According to an embodiment of the present disclosure, the method further comprises: for each channel of each frame of carrier image, filtering each channel pixel by adopting a high-pass filter and then taking an absolute value of a filtering result; smoothing the absolute value of the filtering result by adopting a low-pass filter to obtain a final residual, and then taking the reciprocal of the final residual to respectively obtain the distortion cost value of each channel of each frame of 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: respectively obtaining the difference between the pixel value of each channel of each frame of carrier image and the modified pixel value; and obtaining a distortion cost matrix of each frame of carrier image according to the difference between the pixel value and the modified pixel value of each channel of each frame of carrier image and the distortion cost value of each channel of each frame of carrier image.
According to an embodiment of the present disclosure, the obtaining a color index image of each frame of carrier image in multiple frames of carrier images includes: acquiring an initial index matrix and an initial palette of each frame of carrier image; reordering the initial palettes of the carrier images of each frame according to the square sum of each channel value to obtain the palettes of the carrier images of each frame; obtaining an index matrix of each frame of carrier image according to the initial index matrix, the initial palette and the palette of each frame of carrier image; the obtaining a distortion cost matrix of each frame carrier image according to a difference between a pixel value of each channel of the frame carrier image and a modified pixel value and a distortion cost value of each channel of the frame carrier image includes: obtaining the square sum of the differences of the pixel values of all channels of all the frame carrier images and the modified pixel values; averaging the distortion cost values of all channels of all the frame carrier images to obtain the total distortion cost value of all the frame carrier images; and multiplying the total distortion cost value of each frame of carrier image 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 each frame of carrier image.
According to an embodiment of the present disclosure, the method further comprises: acquiring a color index image of a current frame carrier image, wherein the current frame carrier image is any one frame behind a first frame carrier image in the multi-frame carrier images; carrying out gray level conversion on the color index image of the current frame carrier image to obtain a gray level image of the current frame carrier image; acquiring a color index image of a carrier image of a previous frame of the current frame carrier image; carrying out gray level conversion on the color index image of the previous frame of steganographic image to obtain a gray level image of the previous frame of carrier image; the multiplying the total distortion cost value of each frame of carrier image by the sum of squares of the differences between the pixel values of each channel and the modified pixel values to obtain the distortion cost matrix of each frame of carrier image comprises: calculating the square of the difference between the gray level image of the current frame carrier image and the gray level image of the previous frame carrier image to obtain the brightness variation of each pixel in the current frame carrier image; obtaining a brightness change threshold; and when the brightness variation of a pixel in the current frame carrier image is larger than the brightness variation threshold, multiplying the total distortion cost value of the current frame carrier image by the sum of squares of the differences between the pixel values of all channels of the pixel and the modified pixel value to obtain the color variation of the pixel so as to obtain the distortion cost matrix of each frame carrier image.
According to an embodiment of the present disclosure, the multiplying the total distortion cost value of each frame of carrier image by the sum of squares of differences between the pixel values of each channel and the modified pixel values to obtain the distortion cost matrix of each frame of carrier image includes: obtaining a brightness change threshold; obtaining a distortion cost weight, wherein the distortion cost weight is a value greater than 1; and when the brightness variation of a pixel in the current frame carrier image is not more than the brightness variation threshold, multiplying the total distortion cost value of the current frame carrier image by the square sum of the difference between the pixel value of each channel of the pixel and the modified pixel value, and then multiplying the multiplied value by the distortion cost weight to obtain the color variation of the pixel so as to obtain the distortion cost matrix of each frame carrier image.
According to an embodiment of the present disclosure, the method further comprises: carrying out 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 boundary information of the binary image of each frame of carrier image to obtain a boundary information value of each pixel of each frame of carrier image; acquiring a 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: and for each pixel of each frame of carrier image, when the boundary information value of the pixel is equal to the true boundary value, obtaining the distortion cost of the pixel according to the pixel value and the modified pixel value of each channel of the pixel so as to obtain the distortion cost matrix of each frame of carrier image.
According to an embodiment of the present disclosure, the method further comprises: acquiring a 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: and 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, obtaining the distortion cost of the pixel as the preset distortion value so as to obtain a distortion cost matrix of each frame of carrier image.
According to still another aspect of the present disclosure, there is provided a dynamic image steganography apparatus comprising: the index image obtaining module is used for obtaining a color index image of each frame of carrier image in a plurality of frames of carrier images, the plurality of frames of carrier images are obtained from the dynamic image, and the color index image comprises an index matrix and a color palette; the index value modification module is used 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 a pixel value of each channel of each frame of the carrier image; a second pixel value obtaining module, configured to index the color palette according to the modification index matrix, and obtain a modified pixel value of each channel of each frame of the carrier image; a distortion cost obtaining module, 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 channel of each frame of carrier image; the steganography index matrix obtaining module is used for embedding the steganography information into the index matrix based on the distortion cost matrix of each frame of carrier image to obtain the steganography index matrix of each frame of carrier image; and the steganographic image obtaining module is used for obtaining a plurality of frames of steganographic images according to the steganographic index matrix of each frame of carrier image and the color palette of each frame of carrier image so as to synthesize a dynamic steganographic image.
According to an embodiment of the present disclosure, the apparatus further comprises: the high-pass filtering module is used for filtering each channel pixel of each frame of carrier image by adopting a high-pass filter and then acquiring an absolute value of a filtering result; the channel distortion cost calculation module is used for smoothing the absolute value of the filtering result by adopting a low-pass filter to obtain a final residual, and then taking the reciprocal to respectively obtain the distortion cost value of each channel of each frame of carrier image; the distortion cost obtaining module comprises: the pixel difference making module is used for respectively obtaining the difference between the pixel value of each channel of each frame of carrier image and the modified pixel value; and the image distortion cost calculation module is used for obtaining a distortion cost matrix of each frame of carrier image according to the difference between the pixel value and the modified pixel value of each channel of each frame of carrier image and the distortion cost value of each channel of each frame of carrier image.
According to an embodiment of the present disclosure, the index image obtaining module includes: the initial index image obtaining module is used for obtaining an initial index matrix and an initial palette of each frame of carrier image; the palette updating module is used for reordering the initial palettes of the carrier images of each frame according to the square sum of each channel value to obtain the palettes of the carrier images of each frame; the index matrix updating module is used for obtaining the index matrix of each frame of carrier image according to the initial index matrix, the initial palette and the palette of each frame of carrier image; the distortion cost obtaining module comprises: the pixel change calculation module is used for obtaining the square sum of the difference between the pixel value of each channel of each frame of carrier image and the modified pixel value; the distortion cost value calculation module is used for averaging the distortion cost values of all channels of all the frame carrier images to obtain the total distortion cost value of all the frame carrier images; and the distortion cost matrix calculation module is used for multiplying the total distortion cost value of each frame of carrier image 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 each frame of carrier image.
According to an embodiment of the present disclosure, the apparatus further comprises: a current carrier image obtaining module, configured to obtain a color index image of a current frame carrier image, where the current frame carrier image is any one frame after a first frame carrier image in the multiple frame carrier images; the gray level conversion module is used for carrying out gray level conversion on the color index image of the current frame carrier image to obtain a gray level image of the current frame carrier image; a previous frame carrier image obtaining module, configured to obtain a color index image of a carrier image of a previous frame of the current frame carrier image; the gray level conversion module is also used for carrying out gray level conversion on the color index image of the previous frame of steganographic image to obtain a gray level image of the previous frame of carrier image; the distortion cost matrix calculation module includes: the brightness variation calculating module is used for calculating the square of the difference between the gray image of the current frame carrier image and the gray image of the previous frame carrier image to obtain the brightness variation of each pixel in the current frame carrier image; a brightness change threshold value obtaining module for obtaining a brightness change threshold value; and the distortion cost matrix calculation module is further configured to, when the luminance variation of a pixel in the current frame carrier image is greater than the luminance variation threshold, multiply the total distortion cost value of the current frame carrier image by the sum of squares of differences between pixel values of channels of the pixel and modified pixel values to obtain the color variation of the pixel, so as to obtain the distortion cost matrix of each frame carrier image.
According to an embodiment of the present disclosure, the distortion cost matrix calculation module includes: a brightness change threshold obtaining module for obtaining a brightness change threshold; a distortion cost weight obtaining module, configured to obtain a distortion cost weight, where the distortion cost weight is a value greater than 1; and the distortion cost matrix calculation module is further configured to, when the luminance variation of a pixel in the current frame carrier image is not greater than the luminance variation threshold, multiply the total distortion cost value of the current frame carrier image by the sum of squares of differences between the pixel values of the channels of the pixel and the modified pixel values, and then multiply by the distortion cost weight to obtain the color variation of the pixel, so as to obtain the distortion cost matrix of each frame carrier image.
According to an embodiment of the present disclosure, the apparatus further comprises: the binarization processing module is used for carrying out binarization processing on the color index images of the carrier images of all the frames to obtain binary images of the carrier images of all the frames; the boundary extraction module is used for extracting the boundary information of the binary image of each frame of carrier image and obtaining the boundary information value of each pixel of each frame of carrier image; the true boundary value acquisition module is used for acquiring a true boundary value; the distortion cost matrix calculation module is further configured to: and for each pixel of each frame carrier image, when the boundary information value of the pixel is equal to the true boundary value, obtaining the distortion cost of the pixel according to the pixel value and the modified pixel value of each channel of the pixel so as to obtain the distortion cost matrix of each frame carrier image.
According to an embodiment of the present disclosure, the distortion cost matrix calculation module further includes: the preset distortion value acquisition module is used for acquiring a preset distortion value; the distortion cost matrix calculation module is further configured to: and 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, obtaining the distortion cost of the pixel as the preset distortion value so as to obtain a distortion cost matrix of each frame of carrier image.
According to yet another aspect of the present disclosure, there is provided an apparatus comprising: a memory, a processor and executable instructions stored in the memory and executable in the processor, the processor implementing any of the methods described above when executing the executable instructions.
According to yet another aspect of the present disclosure, there is provided a computer-readable storage medium having stored thereon computer-executable instructions that, when executed by a processor, implement any of the methods described above.
The dynamic image steganography method provided by the embodiment of the disclosure obtains the color index image comprising the index matrix and the color palette of each frame of carrier image in the multi-frame carrier image from the dynamic image, modifying each value in the index matrix to obtain a modified index matrix, obtaining a distortion cost matrix of each frame of carrier image according to a pixel value of each channel of each frame of carrier image obtained by an index matrix index palette and a modified pixel value of each channel of each frame of carrier image obtained by modifying the index matrix index palette, embedding information to be steganographically into the index matrix based on the distortion cost matrix of each frame of carrier image to obtain a steganographic index matrix of each frame of carrier image, and finally obtaining a plurality of 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 to synthesize a dynamic steganographic image, thereby realizing steganography based on the dynamic index image.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The above and other objects, features and advantages of the present disclosure will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings.
Fig. 1 shows a schematic diagram of a system architecture in an embodiment of the disclosure.
Fig. 2 shows a flowchart of a dynamic image steganography method in an embodiment of the present disclosure.
Fig. 3 is a schematic diagram illustrating a processing procedure of step S202 shown in fig. 2 in an embodiment.
Fig. 4 is a flow chart illustrating a distortion cost obtaining method according to an exemplary embodiment.
FIG. 5 is a flowchart illustrating an image boundary method according to an exemplary embodiment.
Fig. 6 is a frame diagram of a steganography method according to one of the animated expressions shown in fig. 2-5.
Fig. 7 is a schematic diagram illustrating a steganographic flow of each frame image according to the embodiments shown in fig. 2 to 6.
Fig. 8 is a diagram illustrating a result of a steganographic experiment according to one embodiment shown in fig. 2 to 6.
Fig. 9 is a schematic diagram showing a comparison between distortion costs of the moving image steganography method shown in fig. 2 to 6 and a related art method.
Fig. 10 is a schematic diagram showing a comparison between the moving image steganography method shown in fig. 2 to 6 and the prior art method.
Fig. 11 is a schematic diagram showing a distortion cost comparison between the dynamic image steganography method shown in fig. 2 to 6 and the prior art method.
FIG. 12 is a block diagram of a dynamic image steganography device in an embodiment of the present disclosure.
Fig. 13 is a block diagram of another dynamic image steganography device in an embodiment of the present disclosure.
Fig. 14 shows a schematic structural diagram of an electronic device in an embodiment of the present disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure 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 disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repetitive description 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 to give a thorough understanding of embodiments of the disclosure. One skilled in the relevant art will recognize, however, that the subject matter of the present disclosure can be practiced without one or more of the specific details, or with other methods, apparatus, steps, etc. In other instances, well-known structures, methods, devices, implementations, or operations are not shown or described in detail to avoid obscuring aspects of the disclosure.
Furthermore, the terms "first", "second", etc. are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of the present disclosure, "a plurality" means at least two, e.g., two, three, etc., unless explicitly specifically limited otherwise. The symbol "/" generally indicates that the former and latter associated objects are in an "or" relationship.
In this disclosure, unless expressly stated or limited otherwise, the terms "connected" and the like are to be construed broadly, e.g., can be electrically connected or can communicate with one another; may be directly connected or indirectly connected through an intermediate. The specific meaning of the above terms in the present disclosure can be understood by those of ordinary skill in the art as appropriate.
As described above, the dynamic images such as animation expressions have different characteristics from the natural images due to their special production methods, and are significantly different from the natural images. Some of the related art steganography methods based on comprehensive-Trellis Codes (STC) applied to natural images cannot be applied to dynamic images at present.
Accordingly, the present disclosure provides a dynamic image steganography method, by obtaining a color index image including an index matrix and a color palette for each frame of a carrier image in a plurality of frame carrier images from a dynamic image, modifying each value in the index matrix to obtain a modified index matrix, obtaining a distortion cost matrix of each frame of carrier image according to a pixel value of each channel of each frame of carrier image obtained by an index matrix index palette and a modified pixel value of each channel of each frame of carrier image obtained by modifying the index matrix index palette, embedding information to be steganographically into the index matrix based on the distortion cost matrix of each frame of carrier image to obtain a steganographic index matrix of each frame of carrier image, and finally obtaining a plurality of 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 to synthesize a dynamic steganographic image, thereby realizing the steganographic of the dynamic image.
Fig. 1 illustrates an exemplary system architecture 10 to which the dynamic image steganography method or dynamic image steganography apparatus of the present disclosure may be applied.
As shown in fig. 1, system architecture 10 may include a terminal device 102, a network 104, and a server 106. The terminal device 102 may be a variety of electronic devices having a display screen and supporting input, output, including but not limited to smart phones, tablets, laptop portable computers, desktop computers, wearable devices, virtual reality devices, smart homes, and the like. Network 104 is the medium used to provide communication links between terminal equipment 102 and server 106. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few. The server 106 may be a server or a cluster of servers, etc. that provide various services.
A user may use terminal device 102 to interact with server 106 via network 104 to receive or transmit data, etc. For example, a user uses the terminal device 102 to upload information to be steganographically and a carrier dynamic image to the server 106 through the network 104, and then obtains the steganographically and dynamically transmitted by the server 106 through the network 104 through the terminal device 102. Also for example, the user inputs steganographic parameters using the terminal device 102 and uploads them to the server 106 via the network 104.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
Fig. 2 is a flow chart illustrating a method of steganography of a dynamic image in accordance with an exemplary embodiment. The moving image steganography method shown in fig. 2 can be applied to, for example, a server side of the system, and can also be applied to a terminal device of the system.
Referring to fig. 2, a method 20 provided by an embodiment of the present disclosure may include the following steps.
In step S202, a color index image of each of a plurality of frames of carrier images is obtained, the plurality of frames of carrier images being obtained from a dynamic image, the color index image including an index matrix and a color palette. The moving image is an image which changes form along with the flowing of time, and can be a GIF (Graphics Interchange Format) image, and the GIF image is characterized in that a plurality of color images can be stored in a GIF file, and a plurality of pieces of image data stored in one file are read out one by one and displayed on a screen during displaying, namely a GIF animation, such as an animation expression, a moving image converted from short video and the like.
In some embodiments, for example, a animated expression may be decomposed to obtain multiple frames of color-indexed images. The animation expression can be read, the animation expression is disassembled into a plurality of frames of color index images, and the obtained basic information of each frame is recorded, for example: index matrix, palette, delay time, number of frames n, image height h, width w, and so on.
In some embodiments, for example, after the initial index matrix and the initial palette of each frame of carrier image are obtained by decomposing the animation expression, the initial palette may be reordered to obtain a new palette, and a new index matrix corresponding to the new palette may be generated, and the detailed description may refer to fig. 3.
In step S204, each value in the index matrix is modified to obtain a modified index matrix. The index matrix is a matrix for indexing each channel color (pixel value) of each pixel from the palette, and modifying the index matrix corresponds to modifying the pixel value of each channel. The modification may be plus 1 or minus 1, etc.
IN some embodiments, the index matrix of the color index map of the current frame (kth frame, k being a positive integer greater than 1) can be recorded as IN k The palette is MN k
In step S206, the palette is indexed according to the index matrix, and pixel values of each channel of each frame of the carrier image are obtained.
In some embodiments, for example, the pixel value matrices of Red (Red, R), Green (Green, G) and Blue (Blue, B) channels corresponding to the images are respectively R1 ═ R1 ij ),G1=(G1 ij ),B1=(B1 ij )∈{0,...,255} h×w Wherein h is the image height, w is the image width, 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, and an index matrix IN is used k The index value at the (i, j) position corresponds to the palette MN k The pixel values of the middle RGB channel are respectively R1 ij 、G1 ij 、B1 ij
In step S208, modified pixel values of each channel of each frame of the carrier image are obtained according to the modified index matrix index palette.
In some embodiments, for example, the modified (i, j) th pixel has a pixel value of R2 ij =R1 ij ±1,G2 ij =G1 ij ±1,B2 ij =B1 ij ±1。
In step S210, a distortion cost matrix of each frame carrier image is obtained according to the pixel value of each channel of each frame carrier image and the modified pixel value of each channel of each frame carrier image. For each channel of each frame of carrier image, a high-pass filter can be adopted to filter each channel pixel and then take the absolute value of the filtering result, then a low-pass filter is adopted to smooth the absolute value of the filtering result to obtain the final residual, and then the reciprocal is taken to respectively obtain the distortion cost value of each channel of each frame of carrier image. And after the distortion cost values of all channels are obtained, the difference between the pixel value and the modified pixel value of each channel of each frame of carrier image is obtained, and then the distortion cost matrix of each frame of carrier image is obtained according to the difference between the pixel value and the modified pixel value of each channel of each frame of carrier image and the distortion cost values of each channel of each frame of carrier image.
In some embodiments, for example, when the color index image is obtained by using the method of fig. 3, a sum of squares of differences between pixel values and modified pixel values of each channel of each frame of carrier image may be obtained, then the distortion cost values of each channel of each frame of carrier image are averaged to obtain a total distortion cost value of each frame of carrier image, and then the total distortion cost value of each frame of carrier image is multiplied by the sum of squares of differences between pixel values and modified pixel values of each channel to obtain a distortion cost matrix of each frame of carrier image. Recording distortion of RGB channelThe values are respectively rho R ═ p R ij ),ρG=(ρG ij ),ρB=(ρB ij ) Then, the distortion cost value of the RGB channel and the total distortion cost value ρ can be obtained by the following formula:
Figure BDA0002988807510000111
Figure BDA0002988807510000112
Figure BDA0002988807510000113
ρ=(ρR+ρG+ρB)/3 (4)
in the above formula, "+" is linear convolution operation, and the convolution adopts a symmetrical filling form to make the size of the image unchanged after the convolution; h is a high-pass filter, L 1 And L 2 Are different low pass filters. The method of the application is to send the index matrix into a steganography algorithm such as an STC coding frame for steganography, after +/-1 operation is performed on the index matrix, the index value is changed by 1, and after the palettes are reordered according to the square of the pixel value, the image pixels are changed from R1(i, j), G1(i, j) and B1(i, j) to R2(i, j), G2(i, j) and B2(i, j), so that the sum of the squares of the difference values of the two is multiplied by the obtained rho to be the true change amount of the color. For the current kth frame, R1(i, j), G1(i, j), B1(i, j) are the index matrices IN of the current frame k The index value at the (i, j) position of (b) corresponds to the palette MN k The three channel values in (B), R2(i, j), G2(i, j), and B2(i, j) are the three channel values corresponding to the new index after the index value ± 1, and the final distortion cost value ρ of the pixel at the current frame (i, j) position can be obtained t (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)
in some embodiments, when the color index image is obtained by using the method of fig. 3, after obtaining the square of the difference between the pixel value of each channel of each frame of the carrier image and the modified pixel value, the distortion cost value of each channel of each frame of the carrier image is multiplied by the square of the difference between the pixel value of each channel and the modified pixel value, and the products of the three channels are summed to obtain the distortion cost matrix of each frame of the carrier image.
In some embodiments, when the final distortion cost value of each pixel point is obtained, the final distortion cost value calculated as in equation (5) may be corrected by determining whether the change of the pixel between frames is suitable for hidden information, and a specific implementation manner may refer to fig. 4.
In step S212, the information to be steganographically embedded in the index matrix based on the distortion cost matrix of each frame carrier image, and a steganographically-encoded index matrix of each frame carrier image is obtained. The secret information can be embedded by adopting binary steganography, for example, in an STC (STC coding) mode, a distortion cost matrix and an index matrix which are composed of distortion cost function values of all pixel points and obtained by calculation of a formula (5) or a formula (6) and the secret information are sent to an STC coding frame, and a steganography index matrix of each frame of carrier image is obtained to generate a secret image. A specific embodiment of the embedded information may be found in fig. 7.
In step S214, a plurality of frames of steganographic images are obtained according to the steganographic index matrix of each frame of carrier image and the color palette of each frame of carrier image to synthesize a dynamic steganographic image. And combining and outputting the steganographic images containing the secret information of a plurality of frames into a dynamic image according to the read delay time when the initial dynamic image is obtained, so as to obtain the dynamic image with the hidden secret information.
According to the dynamic image steganography method provided by the embodiment of the disclosure, a color index image comprising an index matrix and a palette of each frame of carrier image in a plurality of frames of carrier images is obtained from a dynamic image, each value in the index matrix is modified to obtain a modified index matrix, then a distortion cost matrix of each frame of carrier image is obtained according to a pixel value of each channel of each frame of carrier image obtained by the index matrix index palette and a modified pixel value of each channel of each frame of carrier image obtained by modifying the index matrix index palette, information to be steganography is embedded into the index matrix based on the distortion cost matrix of each frame of carrier image to obtain a steganography index matrix of each frame of carrier image, finally a plurality of frames of steganography images are obtained according to the steganography index matrix of each frame of carrier image and the palette of each frame of carrier image to synthesize the dynamic steganography image, thereby realizing steganography based on the dynamic index image, the method is more suitable for color images, more concealed and less easy to detect; the steganography method based on STC coding is more suitable for hiding the information to be transmitted in the public dynamic carrier image for transmission, realizes the transmission of the carrier at the transmitting and receiving ends, and improves the information embedding rate and the safety.
Fig. 3 is a schematic diagram illustrating a processing procedure of step S202 shown in fig. 2 in an embodiment. As shown in fig. 3, in the embodiment of the present disclosure, the step S202 may further include the following steps.
In step S2022, an initial index matrix and an initial palette of each frame of the carrier image are obtained.
Step S2024, rearrange the initial color palette of each frame of carrier image according to the sum of squares of each channel value, and obtain the color palette of each frame of carrier image.
In step S2026, an index matrix of each frame of carrier image is obtained according to the initial index matrix, the initial palette, and the palette of each frame of carrier image. For each frame of carrier image, when it is used as a current frame image for hiding the secret information, the read-in initial palettes are rearranged according to the square sum of each channel value to generate a new palette, and a new index matrix corresponding to the new palette is generated.
According to the palette reordering method provided by the embodiment of the disclosure, the initial palettes are reordered according to the square sum of each channel value, so that the complexity of modifying the carrier image is increased, and the concealment and the detection resistance of the index image can be improved.
Fig. 4 is a flow chart illustrating a distortion cost obtaining method according to an exemplary embodiment. The method shown in fig. 4 may be applied to, for example, a server side of the system, and may also be applied to a terminal device of the system.
Referring to fig. 4, a method 40 provided by an embodiment of the present disclosure may include the following steps.
In step S402, a color index image of a current frame carrier image is acquired, where the current frame carrier image is any one frame after a first frame carrier image in a multi-frame carrier image.
In step S404, the color index image of the current frame carrier image is subjected to gray scale conversion to obtain a gray scale image of the current frame carrier image.
In step S406, a color index image of a carrier image of a frame previous to the current frame carrier image is acquired.
In step S408, the color index image of the steganographic image of the previous frame is subjected to gray scale conversion, and a gray scale image of the carrier image of the previous frame is obtained.
In some embodiments, the gray scale map to which the color index map of the current k-th frame is converted can be recorded as G k =(G ij ) G is gray scale image corresponding to the steganographic image with the secret information embedded in the previous frame k-1 =(B ij )。
In step S410, the gray scale image of the current frame carrier image and the gray scale image of the previous frame carrier image are subtracted and squared to obtain the luminance variation of each pixel in the current frame carrier image.
In step S412, a luminance change threshold value is obtained.
In step S414, when the luminance variation of a pixel in the current frame carrier image is greater than the luminance variation threshold, the total distortion cost value of the current frame carrier image is multiplied by the sum of squares of differences between pixel values of channels of the pixel and modified pixel values to obtain the color variation of the pixel, so as to obtain the distortion cost matrix of each frame carrier image.
In step S4162, when the luminance variation amount of a pixel in the current frame carrier image is not greater than the luminance variation threshold, a distortion cost weight is obtained, which is a value greater than 1.
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, so as to obtain the color change amount of the pixel, thereby obtaining the distortion cost matrix of each frame carrier image.
In some embodiments, it can be noted that the luminance change threshold is ε, the distortion cost weight is δ, δ > 1, and equation (5) can be rewritten as:
Figure BDA0002988807510000141
wherein (G) is ij )-(B ij )) 2 Comparing with a preset threshold epsilon, if the threshold epsilon is larger than the preset threshold epsilon, the area is an area with large change, and the information is suitable to be hidden; if the distortion cost value is smaller than the threshold value, the distortion cost value is indicated to be a flat area and is not suitable for steganography, and therefore the distortion cost value needs to be multiplied by a weight delta larger than 1.
In some embodiments, for example, in the case that the dynamic image of the carrier is an animated expression, the lines of the character are main components constituting the animated expression, and the pixel values of the points on the lines are close; meanwhile, a large-area coloring area exists in the image, and the pixel values of the same area are consistent, so that the abnormity of the dense image can be easily found if the coloring area is modified. The above characteristics can be considered to make a constraint on the formula (6), and the distortion cost value is calculated according to the formula (6) in the part of the contour (boundary) region of the image, while the non-contour region sets the distortion cost value as a preset distortion value, and the preset distortion value is a very large threshold value, that is, the information is not embedded in the part, so that the quality of the image with the density can be effectively improved. A specific embodiment of the image boundary information extraction method may refer to fig. 5.
According to the distortion cost obtaining method provided by the embodiment of the disclosure, whether the change of the brightness of the corresponding pixel between frames is suitable for hiding information is considered when the distortion cost of each pixel is calculated, so that the method is more suitable for steganography of a dynamic image, and the safety of the image with the secret content is improved.
FIG. 5 is a flow chart illustrating an image boundary method according to an exemplary embodiment. The method shown in fig. 5 may be applied to, for example, a server side of the system, and may also be applied to a terminal device of the system.
Referring to fig. 5, a method 50 provided by an embodiment of the present disclosure may include the following steps.
In step S502, a binarization process is performed on the color index image of each frame of carrier image, and a binary image of each frame of carrier image is obtained.
In step S504, boundary information of the binary image of each frame of the carrier image is extracted, and a boundary information value of each pixel of each frame of the carrier image is obtained.
In some embodiments, for example, C may be noted k =(C ij ) If the pixel at the position of the current frame (i, j) is the boundary, it is marked as C ij 1 is true boundary value; when the pixel at the current frame (i, j) position is not a boundary, it can be recorded as C ij =0。
According to the method provided by the embodiment of the disclosure, the boundary information is considered when the distortion cost of each pixel is calculated, and the steganography is performed at the image contour, so that the visual effect of the secret animation expression is improved, and the safety of the steganography is improved.
Fig. 6 is a frame diagram of a steganography method according to one of the animated expressions shown in fig. 2-5. As shown in fig. 6, first, the animation expression 6002 is decomposed (S602) into a plurality of frames of color index images 6004, and each frame of image is embedded with secret information according to a designed information embedding method (S604), thereby obtaining a plurality of images 6006 in which secret information is hidden, and the plurality of frames are combined (S606) and output as an animation image, thereby obtaining an animation expression in which secret information is hidden.
Fig. 7 is a schematic diagram of a steganographic flow of each frame image shown in fig. 2 to 6. As shown in fig. 7, for an image 7002 used for hiding secret information for the current frame, the read palettes are first reordered by the sum of the squares of the RGB three channel values to generate new palettes (S702), and a new index matrix corresponding to the new palettes is generated (S704). The current color index map is then binarized to generate a binary image (S706), and then boundary information of the binary image, which is used to define a distortion cost function, is extracted (S708). The color index map 7002 of the current frame and the color index map 7004 of the previous frame with the hidden secret information are converted into gray maps (S7102, S7104), which are also used for defining a distortion cost function. Finally, a distortion cost function is defined according to the extracted boundary information, the gray level images of the current frame and the previous frame, and the new color palette and the index matrix of the current frame, the distortion cost function value of each pixel is calculated (S712), and the calculated distortion cost function value, the index matrix and the secret information 7006 are sent to an STC coding frame (S714), so that the secret image 7008 can be obtained.
Fig. 8 is a diagram showing an example of a set of experimental results of STC-encoded steganography of a plurality of animation expressions according to the moving picture steganography method shown in fig. 2 to 6. As shown in fig. 8(a) - (i), as can be seen from the comparison between the original image and the corresponding secret images in which the secret information of 600 bits and 1100 bits is steganographically written, the image in which the secret information is hidden has a good visual effect, the information cannot be seen by naked eyes, the secret images under different embedding rates have no obvious visual difference, and the experimental effect of the 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 moving image steganography method shown in fig. 2-6 and the prior art method. In the prior art method, the pixel modification of each channel is not considered when the distortion cost is calculated. As shown in fig. 9, (a) is the original carrier image, (b) is the image boundary information, (c) is the distortion cost value of pixel +1 calculated for the disclosed method, (d) is the distortion cost value of pixel-1 calculated for the disclosed method, (e) is the distortion cost value of pixel +1 calculated for the prior art method, and (f) is the distortion cost value of pixel-1 calculated for the prior art method. As can be seen from fig. 9, the distribution of the distortion cost values calculated by the method of the present disclosure is obviously different from the distribution of the distortion cost values calculated by the method of the prior art, the two-dimensional image of the distortion cost values of the method of the present disclosure is similar to the contour boundary information extracted from the original image, the distortion cost values calculated by the method of the prior art are smaller in the large-area colored region, and are larger in other regions, so that the method of the prior art preferentially modifies the large-area colored region when information is embedded. According to the characteristics of the animation expression: the color information of the animation image is rich at the outline and each color is similar, and other large-area colored areas are single colors and are not suitable for modification. Therefore, the distortion cost function provided by the method disclosed by the invention is well attached to the characteristics of the animation image, and the information is preferentially embedded in the outline area of the expression image.
The table below gives experimental data comparing the method of the present disclosure with the prior art method, and gives the test errors for both methods at 6 different embedment amounts. It can be seen that, under the condition that the characteristics and the embedded information of the differential Pixel adjacent Matrix (SPAM) are 600 bits (bit), the PE value of the distortion cost function proposed by the present disclosure (6) is improved by 14.97% compared with the prior art; the PE value is improved by 9.09% under the characteristics of a Spatial Rich Model (SRMQ 1) and 600 bit. Under the condition that the SPAM characteristics and the embedded information are 1100 bits, the distortion cost function provided by the public formula (6) is improved by 12.85 percent compared with the PE value of the method in the prior art; the PE value of the method is improved by 4.86% under the SRMQ1 characteristics and 1100 bit.
Figure BDA0002988807510000161
FIGS. 10 and 11 plot the data in the above table, showing the comparison of the test error of the disclosed method with the test error of the prior art under the characteristics of SPAM and SRMQ1, respectively, it can be seen intuitively that the test error of both methods decreases with the increase of the number of embedded bits; meanwhile, the PE value of the method provided by the disclosure is far higher than that of the prior art no matter what embedding rate is.
From the above experimental data, it can be seen that the performance of the method of the present disclosure is significantly better than that of the prior art, indicating that the method of the present disclosure has stronger anti-steganalysis ability.
FIG. 12 is a block diagram illustrating a dynamic image steganography device in accordance with an exemplary embodiment. The apparatus shown in fig. 12 may be applied to, for example, a server side of the system, and may also be applied to a terminal device of the system.
Referring to fig. 12, the dynamic image steganography apparatus 120 provided by the embodiment of the present disclosure 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, a distortion cost obtaining module 1210, a steganography index matrix obtaining module 1212, and a steganography image obtaining module 1214.
The index image obtaining module 1202 may be configured to obtain a color index image of each frame of carrier images in a plurality of frames of carrier images, where the plurality of frames of carrier images are obtained from a dynamic image, and the color index image includes an index matrix and a color palette.
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 obtain a pixel value of each channel of each frame of the carrier image according to the index matrix index palette.
The second pixel value obtaining module 1208 is configured to obtain a modified pixel value of each channel of each frame of the carrier image according to the modified index matrix index palette.
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 channel of each frame of carrier image.
The steganography index matrix obtaining module 1212 may be configured to embed the steganography information into the index matrix based on the distortion cost matrix of each frame carrier image, so as to obtain a steganography index matrix of each frame carrier image.
The steganographic image obtaining module 1214 is configured to obtain multiple frames of steganographic images according to the steganographic index matrix of each frame of carrier image and the color palette of each frame of carrier image to synthesize a dynamic steganographic image.
FIG. 13 is a block diagram illustrating a dynamic image steganography device in accordance with an exemplary embodiment. The apparatus shown in fig. 13 can be applied to, for example, a server side of the system described above, and can also be applied to a terminal device of the system described above.
Referring to fig. 13, the dynamic image steganography apparatus 130 provided by the embodiment of the present disclosure may include an index image obtaining module 1302, a current carrier image obtaining module 13032, a previous frame carrier image obtaining module 13034, a gray level conversion module 13036, an index value modification module 1304, a binarization processing module 13052, a boundary extraction module 13054, a true boundary value obtaining module 13056, a preset distortion value obtaining module 13058, a first pixel value obtaining module 1306, a second pixel value obtaining module 1308, a high-pass filtering module 13092, a channel distortion cost calculation module 13094, a distortion cost obtaining module 1310, a steganography index matrix obtaining module 1312, and a steganography image obtaining module 1314, where the index image obtaining module 1302 may include an initial index image obtaining module 13022, a palette updating module 13024, and an index matrix updating module 13026, and 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 luminance change amount calculation module 13112, a luminance change threshold value obtaining module 13114, and a distortion cost weight obtaining module 13116.
The index image obtaining module 1302 may be configured to obtain a color index image of each frame of carrier image in a plurality of frame of carrier images, where the plurality of frame of carrier images are 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 may be configured to obtain an initial index matrix and an initial color palette for each frame of carrier image.
The current carrier image obtaining module 13032 may be configured to obtain a color index image of a current frame carrier image, where the current frame carrier image is any one frame after a first frame carrier image in a multi-frame carrier image.
The previous frame carrier image obtaining module 13034 may be used to obtain a color index image of a carrier image of a frame previous to the current frame carrier image.
The gray level conversion module 13036 may be configured to perform gray level conversion on the color index image of the current frame carrier image to obtain a gray level image of the current frame carrier image; and carrying out gray scale conversion on the color index image of the steganography image of the previous frame to obtain a gray scale image of the carrier image of the previous frame.
Palette update module 13024 may be configured to reorder the initial palette of each frame of carrier image according to the sum of squares of each channel value, to obtain the palette of each frame of carrier image.
The index matrix updating module 13026 may be configured to obtain an index matrix of each frame of carrier image according to the initial index matrix, the initial palette, and the palette of each frame of 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 may be configured to 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.
The boundary extraction module 13054 may be configured to extract boundary information of the binary image of each frame of the carrier image, and obtain a boundary information value of each pixel of each frame of the carrier image.
The true boundary value acquisition module 13056 may be used to acquire a true boundary value.
The preset distortion value obtaining module 13058 may be configured to obtain a preset distortion value.
The first pixel value obtaining module 1306 may be configured to obtain pixel values of each channel of each frame carrier image according to the index matrix index palette.
The second pixel value obtaining module 1308 may be configured to obtain a modified pixel value of each channel of each frame of the carrier image according to the modified index matrix index palette.
The high-pass filtering module 13092 may be configured to, for each channel of each frame of the carrier image, filter pixels of each channel by using a high-pass filter and then obtain an absolute value of a filtering result.
The channel distortion cost calculation module 13094 may be configured to smooth the absolute value of the filtering result by using a low-pass filter to obtain a final residual, and then take the reciprocal to obtain the distortion cost value of each channel of each frame of the 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 channel of each frame of carrier image.
The pixel difference module 13102 may be configured to obtain the difference between the pixel value and the modified pixel value for each channel of each frame of the carrier image, respectively.
The image distortion cost calculation module 13104 may be configured to obtain the distortion cost matrix of each frame of carrier image according to a 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 variation calculation module 13106 can be configured to obtain a sum of squares of differences between pixel values and modified pixel values for each channel of each frame of the carrier image.
The distortion cost value calculation module 13108 may be configured to average the distortion cost values of the channels 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 may be configured to multiply the total distortion cost value of each frame of the carrier image by a sum of squares of differences between the pixel values of each channel and the modified pixel values, to obtain a distortion cost matrix of each frame of the carrier image.
The brightness variation calculating module 13112 may be configured to perform difference and square calculation on the grayscale map of the current frame carrier image and the grayscale map of the previous frame carrier image to obtain the brightness variation of each pixel in the current frame carrier image.
The brightness change threshold obtaining module 13114 may be used to obtain a brightness change threshold.
The distortion cost matrix calculation module 13110 is further configured to, when the luminance variation of a pixel in the current frame carrier image is greater than the luminance variation threshold, multiply the total distortion cost value of the current frame carrier image by a sum of squares of differences between pixel values of channels of the pixel and modified pixel values to obtain a color variation of the pixel, so as to obtain a distortion cost matrix of each frame carrier image.
The distortion cost weight obtaining module 13116 may be used to obtain a distortion cost weight, which is a value greater than 1.
The distortion cost matrix calculation module 13110 is further configured to, when the luminance variation of a pixel in the current frame carrier image is not greater than the luminance variation threshold, multiply the total distortion cost value of the current frame carrier image by the square sum of the differences between the pixel values of the channels of the pixel and the modified pixel values, and then multiply by the distortion cost weight to obtain the color variation of the pixel, so as to obtain the distortion cost matrix of each frame carrier image.
The distortion cost matrix calculation module 13110 is further configured to, for each pixel of each frame of the carrier image, obtain, when the boundary information value of the pixel is equal to the true boundary value, a distortion cost of the pixel according to the pixel value and the modified pixel value of each channel of the pixel, so as to obtain a distortion cost matrix of each frame of the carrier image.
The distortion cost matrix calculation module 13110 is further configured to, for each pixel of each frame carrier image, obtain, when the boundary information value of the pixel is not equal to the true boundary value, the distortion cost of the pixel as a preset distortion value, so as to obtain a distortion cost matrix of each frame carrier image.
The steganography index matrix obtaining module 1312 may be configured to embed the information to be steganographically into the index matrix based on the distortion cost matrix of each frame of the carrier image, and obtain the steganography index matrix of each frame of the carrier image.
The steganographic image obtaining module 1314 may be configured to obtain multiple frames of steganographic images according to the steganographic index matrix of each frame of carrier image and the color palette of each frame of carrier image to synthesize a dynamic steganographic image.
The specific implementation of each module in the apparatus provided in the embodiment of the present disclosure may refer to the content in the foregoing method, and is not described herein again.
Fig. 14 shows a schematic structural diagram of an electronic device in an embodiment of the present disclosure. It should be noted that the apparatus shown in fig. 14 is only an example of a computer system, and should not bring any limitation to the function and the scope of the application of the embodiments of the present disclosure.
As shown in fig. 14, the device 1400 includes a Central Processing Unit (CPU)1401 that can perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)1402 or a program loaded from a storage portion 1408 into a Random Access Memory (RAM) 1403. In the RAM 1403, various programs and data necessary for the operation of the device 1400 are also stored. The CPU1401, ROM 1402, and RAM 1403 are connected to each other via 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 portion 1406 including a keyboard, a mouse, and the like; an output portion 1407 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and the like, and a speaker and the like; a storage portion 1408 including a hard disk and the like; and a communication portion 1409 including a network interface card such as a LAN card, a modem, or 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, or the like is mounted as necessary on the drive 1414, so that a computer program read therefrom is mounted as necessary in the storage section 1408.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication portion 1409 and/or installed from the removable medium 1411. The above-described functions defined in the system of the present disclosure are executed when the computer program is executed by a Central Processing Unit (CPU) 1401.
It should be noted that the computer readable media shown in the present disclosure may be computer readable signal media or computer readable storage media or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer-readable signal medium may include a propagated data signal with computer-readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic 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 disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block 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 will also be noted that each block of the block diagrams or flowchart illustration, and combinations of blocks in the block diagrams or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present disclosure may be implemented by software or hardware. The described modules may also be provided in a processor, which may be described as: a processor comprises an index image obtaining module, an index value modifying module, a first pixel value obtaining module, a second pixel value obtaining module, a distortion cost obtaining module, a steganographic index matrix obtaining module and a steganographic image obtaining module. The names of these modules do not constitute a limitation to the module itself in some cases, and for example, the index image obtaining module may also be described as a "module that obtains a color index image of a plurality of frame carrier images from a dynamic carrier image".
As another aspect, the present disclosure also provides a computer-readable medium, which may be contained in the apparatus described in the above embodiments; or may be separate and not incorporated into the device. The computer readable medium carries one or more programs which, when executed by a device, cause the device to comprise:
obtaining a color index image of each frame of carrier image in a plurality of frames of carrier images, wherein the plurality of frames of carrier images are obtained from dynamic images, and the color index image comprises an index matrix and a color palette; modifying each value in the index matrix to obtain a modified index matrix; obtaining the pixel value of each channel of each frame of carrier image according to the index matrix index palette; obtaining a modified pixel value of each channel of each frame of carrier image according to the modified index matrix index palette; obtaining 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 channel of each frame of carrier image; embedding the information to be steganographically into an index matrix based on the distortion cost matrix of each frame of carrier image to obtain a steganographically-indexed matrix of each frame of carrier image; and obtaining a plurality of frames of steganographic images according to the steganographic index matrix of each frame of carrier image and the color palette of each frame of carrier image to synthesize a dynamic steganographic image.
Exemplary embodiments of the present disclosure are specifically illustrated and described above. It is to be understood that the disclosure is not limited to the precise construction, arrangements, or instrumentalities described herein; on the contrary, the disclosure is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims.

Claims (10)

1. A method for steganography of a dynamic image, comprising:
obtaining a color index image of each frame of carrier image in a plurality of frames of carrier images, wherein the plurality of frames of carrier images are obtained from the dynamic image, and the color index image comprises an index matrix and a color palette;
modifying each value in the index matrix to obtain a modified index matrix;
indexing the color palette according to the index matrix to obtain pixel values of channels of carrier images of frames;
indexing the color palette according to the modification index matrix to obtain modified pixel values of each channel of each frame of carrier image;
obtaining 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 channel of each frame of carrier image;
embedding the information to be steganographically into the index matrix based on the distortion cost matrix of each frame of carrier image to obtain the steganographically-indexed matrix of each frame of carrier image;
and obtaining a plurality of frames of steganographic images according to the steganographic index matrix of each frame of carrier image and the color palette of each frame of carrier image so as to synthesize a dynamic steganographic image.
2. The method of claim 1, further comprising:
for each channel of each frame of carrier image, filtering each channel pixel by adopting a high-pass filter and then taking an absolute value of a filtering result;
smoothing the absolute value of the filtering result by adopting a low-pass filter to obtain a final residual, and then taking the reciprocal to respectively obtain the distortion cost value of each channel of each frame of 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:
respectively obtaining the difference between the pixel value of each channel of each frame of carrier image and the modified pixel value;
and obtaining a distortion cost matrix of each frame of carrier image according to the difference between the pixel value and the modified pixel value of each channel of each frame of carrier image and the distortion cost value of each channel of each frame of carrier image.
3. The method of claim 2, wherein obtaining the color index image of each of the plurality of frame carrier images comprises:
acquiring an initial index matrix and an initial palette of each frame of carrier image;
reordering the initial palettes of the carrier images of each frame according to the square sum of each channel value to obtain the palettes of the carrier images of each frame;
obtaining an index matrix of each frame of carrier image according to the initial index matrix, the initial palette and the palette of each frame of carrier image;
the obtaining a distortion cost matrix of each frame carrier image according to a difference between a pixel value of each channel of the frame carrier image and a modified pixel value and a distortion cost value of each channel of the frame carrier image includes:
obtaining the square sum of the differences of the pixel values of all channels of all the frame carrier images and the modified pixel values;
averaging the distortion cost values of all channels of all the frame carrier images to obtain the total distortion cost value of all the frame carrier images;
and multiplying the total distortion cost value of each frame of carrier image 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 each frame of carrier image.
4. The method of claim 3, further comprising:
acquiring a color index image of a current frame carrier image, wherein the current frame carrier image is any frame behind a first frame carrier image in the multi-frame carrier image;
carrying out gray level conversion on the color index image of the current frame carrier image to obtain a gray level image of the current frame carrier image;
acquiring a color index image of a carrier image of a previous frame of the current frame carrier image;
carrying out gray level conversion on the color index image of the previous frame of steganographic image to obtain a gray level image of the previous frame of carrier image;
the step of multiplying the total distortion cost value of each frame of carrier image by the sum of squares of the differences between the pixel values of each channel and the modified pixel values to obtain the distortion cost matrix of each frame of carrier image includes:
calculating the square of the difference between the gray image of the current frame carrier image and the gray image of the previous frame carrier image to obtain the brightness variation of each pixel in the current frame carrier image;
obtaining a brightness change threshold;
and when the brightness variation of a pixel in the current frame carrier image is larger than the brightness variation threshold, multiplying the total distortion cost value of the current frame carrier image by the sum of squares of the differences between the pixel values of all channels of the pixel and the modified pixel value to obtain the color variation of the pixel so as to obtain the distortion cost matrix of each frame carrier image.
5. The method of claim 3, wherein multiplying the total distortion cost value of each frame carrier image by the sum of squares of differences between pixel values of each channel and modified pixel values to obtain the distortion cost matrix of each frame carrier image comprises:
obtaining a brightness change threshold;
obtaining a distortion cost weight, wherein the distortion cost weight is a value greater than 1;
and when the brightness variation of a pixel in the current frame carrier image is not larger than the brightness variation threshold, multiplying the total distortion cost value of the current frame carrier image by the sum of squares of the differences between the pixel values of the channels of the pixel and the modified pixel values, and then multiplying the sum by the distortion cost weight to obtain the color variation of the pixel so as to obtain the distortion cost matrix of each frame carrier image.
6. The method of any one of claims 1 to 5, further comprising:
carrying out 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 boundary information of the binary image of each frame of carrier image to obtain a boundary information value of each pixel of each frame of carrier image;
acquiring a 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:
and for each pixel of each frame carrier image, when the boundary information value of the pixel is equal to the true boundary value, obtaining the distortion cost of the pixel according to the pixel value and the modified pixel value of each channel of the pixel so as to obtain the distortion cost matrix of each frame carrier image.
7. The method of claim 6, further comprising:
acquiring a 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:
and 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, obtaining the distortion cost of the pixel as the preset distortion value so as to obtain a distortion cost matrix of each frame of carrier image.
8. A dynamic image steganography apparatus, comprising:
the index image obtaining module is used for obtaining a color index image of each frame of carrier image in a plurality of frames of carrier images, the plurality of frames of carrier images are obtained from the dynamic image, and the color index image comprises an index matrix and a color palette;
the index value modification module is used for modifying each value in the index matrix to obtain a modified index matrix;
a first pixel value obtaining module, configured to index the color palette according to the index matrix, and obtain a pixel value of each channel of each frame of the carrier image;
a second pixel value obtaining module, configured to index the palette according to the modification index matrix, and obtain a modified pixel value of each channel of each frame of the carrier image;
a distortion cost obtaining module, 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 channel of each frame of carrier image;
the steganography index matrix obtaining module is used for embedding the steganography information into the index matrix based on the distortion cost matrix of each frame of carrier image to obtain the steganography index matrix of each frame of carrier image;
and the steganographic image obtaining module is used for obtaining a plurality of frames of steganographic images according to the steganographic index matrix of each frame of carrier image and the color palette of each frame of carrier image so as to synthesize a dynamic steganographic image.
9. An apparatus, comprising: memory, processor and executable instructions stored in the memory and executable in the processor, characterized in that the processor implements the method according to any of claims 1-7 when executing the executable instructions.
10. A computer-readable storage medium having stored thereon computer-executable instructions, which when executed by a processor, implement the method of any one of claims 1-7.
CN202110309029.8A 2021-03-23 2021-03-23 Dynamic image steganography method, device, equipment and storage medium Pending CN115115497A (en)

Priority Applications (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
PCT/CN2021/141728 WO2022199180A1 (en) 2021-03-23 2021-12-27 Method for dynamic image steganography, apparatus, device, and storage medium

Applications Claiming Priority (1)

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

Publications (1)

Publication Number Publication Date
CN115115497A true CN115115497A (en) 2022-09-27

Family

ID=83324042

Family Applications (1)

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

Country Status (2)

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

Family Cites Families (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
CN100452884C (en) * 2005-07-14 2009-01-14 上海交通大学 Method for detecting GIF infomration hidden
WO2019075702A1 (en) * 2017-10-19 2019-04-25 Tencent Technology (Shenzhen) Company Limited Methods and systems for processing graphics
CN109410116B (en) * 2018-11-02 2023-11-14 江苏亿鸿信息工程有限公司 Information hiding and extracting method for animation image

Also Published As

Publication number Publication date
WO2022199180A1 (en) 2022-09-29

Similar Documents

Publication Publication Date Title
Zhang et al. Steganography using multiple-base notational system and human vision sensitivity
Lin et al. A novel data hiding algorithm for high dynamic range images
KR101014174B1 (en) Image data set with embedded pre-subpixel rendered image
CN112419151B (en) Image degradation processing method and device, storage medium and electronic equipment
Wang et al. Non-additive cost functions for color image steganography based on inter-channel correlations and differences
CN110163237A (en) Model training and image processing method, device, medium, electronic equipment
US10853917B2 (en) Color image authentication method based on palette compression technique
WO2000046740A1 (en) Non-linear and linear method of scale-up or scale-down image resolution conversion
CN102341825A (en) Multi-modal tone-mapping of images
CN109922344A (en) Technology for being encoded, being decoded and being indicated to high dynamic range images
CN107852501A (en) The method and apparatus encoded for both SDR images for being obtained to HDR image and using color mapping function from the HDR image
WO2010014270A1 (en) Method, apparatus, and computer software for digital video scan rate conversions with minimization of artifacts
Yalman et al. An image interpolation based reversible data hiding method using R-weighted coding
Darwis et al. A new digital image steganography based on center embedded pixel positioning
CN111080655A (en) Image segmentation and model training method, device, medium and electronic equipment
JP2009536391A (en) Upscaling
CN113556582A (en) Video data processing method, device, equipment and storage medium
CN110852980A (en) Interactive image filling method and system, server, device and medium
Liu et al. Reversible data hiding for JPEG images employing all quantized non-zero AC coefficients
Mukherjee et al. Adaptive dithering using Curved Markov-Gaussian noise in the quantized domain for mapping SDR to HDR image
Liao et al. GIFMarking: The robust watermarking for animated GIF based deep learning
CN108924557B (en) Image processing method, image processing device, electronic equipment and storage medium
Liu et al. JPEG robust invertible grayscale
CN114930824A (en) Depth palette prediction
CN113421312A (en) Method and device for coloring black and white video, storage medium and terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination