# A New Steganography Method for Dynamic GIF Images Based on Palette Sort

Authors: Jingzhi Lin; Zhenxing Qian; Zichi Wang; Xinpeng Zhang; Guorui Feng
Journal: Wireless Communications and Mobile Computing
 (2020)

---

## Abstract

This paper proposes a new steganography method for hiding data into dynamic GIF (Graphics Interchange Format) images. When using the STC framework, we propose a new algorithm of cost assignment according to the characteristics of dynamic GIF images, including the image palette and the correlation of interframes. We also propose a payload allocation algorithm for different frames. First, we reorder the palette of GIF images to reduce the modifications on pixel values when modifying the index values. As the different modifications on index values would result in different impacts on pixel values, we assign the elements with less impact on pixel values with small embedding costs. Meanwhile, small embedding costs are also assigned for the elements in the regions that the interframe changes are large enough. Finally, we calculate an appropriate payload for each frame using the embedding probability obtained from the proposed distortion function. Experimental results show that the proposed method has a better security performance than state-of-the-art works.


---

## Body

## 1. Introduction

Stenography is technology that hides secret data into covers for covert transmission [1]. The most important aim of steganography is to combat the adversary’s detection using steganalysis tools [2–4]. As digital images are the most popular covers in steganography, many methods and tools of digital image steganography have been developed since 1990s, such as LSB (Least Significant Bitplane) [5]. To combat early steganalysis attacks, some algorithms have also been designed to keep the invariance of statistical properties [6]. However, most of the traditional works are not secure enough to modern steganalysis.Currently, content adaptive steganography approaches are designed to improve security by minimizing the distortion between the cover and the stego. According to this idea, a popular framework for digital image steganography is defined in [7, 8], which includes two points, i.e., allocating the embedding cost and realizing the data encoding. In the first part, the embedding cost is allocated for each element of the cover to quantify the effect on the cover image when modifying the elements [9, 10]. In the second part, an encoding method is designed to achieve the theoretical embedding payload with the distortion function. Nowadays, STC (Syndrome-Trellis Codes) is the most popular tool for adaptive embedding [11, 12]. In this framework, defining a suitable distortion function is vital for steganography security. Starting from HUGO [13], many distortion functions have been proposed for spatial and JPEG images, e.g., MVGG [7], WOW [14], UNIWARD [15], HILL [16], and UED [17]. For spatial images, distortion functions allocate the embedding costs for gray values or RGB values. For JPEG images, distortion functions allocate the embedding costs for JPEG coefficients. Besides, some spatial image distortion functions can be used for JPEG images by allocating the embedding costs for the coefficients obtained from the inverse transformation of JPEG coefficients. As a countering technique, many effective steganalysis approaches have also been proposed. Steganalysts always train models to distinguish suspicious images from clean images [18]. Generally, a steganalysis model contains two parts. One is to extract features from a set of images, such as SRM [18], SPAM [19], DCTR [20], and GFR [21]. The other is to train a classifier using machine learning tools, e.g., the ensemble classifier [22]. Besides, both parts can also be realized by deep learning.With the development of 4G/5G communication techniques and the social networks, GIF (Graphics Interchange Format) images are more and more popular because of the characteristics of the small size and the convenience to display animation effects. Different from the spatial images and JPEG images, each image frame used in GIF is composed of a color list, i.e., palette, and a set of index values, i.e., image data. When using GIF images as covers, there are three ways to hide secret data. The first way is structure steganography that modifies certain sections in the file header to accommodate secret data. The second way is to embed secret data by changing the correspondence between index values and actual pixel values in the palette, e.g., Gifshuffile [23]. The third way is to embed secret data by slightly modifying the index values, such as OPA (Optimal Parity Assignment) [24] and MBA (MultiBit Assignment) [25].In 1999, Fridrich proposes a steganography method for palette images, which searches for closest colors and embeds data according to the parity of pixel values [26]. Some other methods for GIF steganography have also proposed in [27–29]. In recent years, there have also been some works on GIF steganography. Generally, these methods use some mathematical operations to calculate whether a pixel should be modified to embed data, e.g., the adaptive method using MOD operation by Fathurohman et al. [30]. These works have good capabilities of data embedding. However, they were designed for static GIF images.In 2015, a method for embedding data into dynamic GIF images is proposed, which uses EzStego and chaos system to hide data [31]. From 2016 to 2017, a series of steganography approaches for dynamic GIF images were proposed [32–34]. In those methods, the steganography for static GIF is directly used in each frame of the dynamic GIF. Meanwhile, each frame is assigned with an equal payload. In 2018, Basak et al. propose to embed data into dynamic GIF images using the difference between adjacent pixels in the same frame [35]. Saleh and Merzah propose to combine LZW, EzStego, and LSB to embed secret text messages into dynamic GIF images [36]. Shi et al. propose to use the STC framework for emoji GIF images by designing a new distortion function [37]. These works have good performances on dynamic GIF steganography. However, the correlations between frames are not investigated efficiently. To design a more secure steganography tool for dynamic GIF images, we must consider the changes in the interframes. Meanwhile, payload assignment is also important [38]. While previous works embed even payloads into GIF frames, it would be more appropriate to distribute payloads unevenly to different frames to improve the performance of statistical undetectability, since each frame has different contents.In this paper, we propose a new algorithm of cost assignment for dynamic GIF images by combining the characteristics of dynamic GIF image palette and the inter frames. Meanwhile, we propose to assign suitable embedding payloads for each frame using the entropy function. Finally, we construct a steganography framework for dynamic GIF images to improve the security. The rest of this paper is organized as follows. We introduce the preliminaries of GIF steganography in Section2. The proposed framework will be described in Section 3. Section 4 shows the experimental results and analysis. Section 5 concludes the whole paper.


## 2. Preliminary

In this paper, the matrices, vectors, and sets are written in boldface, the variables are written in italics. For a dynamic GIF imageA with t frames, we denote the index values of the dynamic GIF image as a. For each frame, we denote the jth frame as Aj and denote the index value sequence of Aj as aj=a1j,a2j,⋯,anj. Therefore, a can represented as a11,a21,⋯,an1,⋯,a1t,a2t,⋯,ant, in which n is the number of pixels in a frame and t is the number of frames in the dynamic GIF image. For a color dynamic GIF image, the pixel Aij of the ith element of the jth frame has an index value aij and the corresponding RGB vector (Rij, Gij, and Bij).In order to embed secret data, a sender modifies a cover imageX=x1,x2,⋯,xn to generate a stego image Y=y1,y2,⋯,yn, in which n is the number of pixels in a cover. The generated additive distortion function DX,Y between X and Y is the sum of the embedding cost of each element, s.t.
(1)DX,Y=∑i=1nρixi,yi,in which ρi∈0,∞ is the embedding cost of changing xi to yi. According to the adjusted range I, the common embedding operations on xi are divided into two types, i.e., the binary when I=2 and the ternary when I=3. For example, the embedding operations of ±1 is the ternary embedding that is expressed by I=−1,0,+1 and the stego yi=xi−1,xi,xi+1. We denote the embedding costs of three cases of yi=xi−1,xi,xi+1 as ρ−i, ρi, and ρ+i, respectively, in which ρi=0 and ρ−i,ρ+i∈0,+∞.In [39], for a given embedding cost, the modification probabilitypi can be obtained:
(2)piI=e−λρiI∑I∈−1,0,+1e−λρiI,where λ∈0,∞ is obtained from the constraints of the modification probability and the m-bit secret data in (3).
(3)Hp=−∑i=1npilogpi=m.In [39], it has been theoretically proved that the minimum distortion is achievable when embeddingm-bit secret data into n cover data.
(4)Dminm,n,ρ=∑i=1nρipi.Derivation of the minimum distortion corresponding to a fixed embedding payload is the rate-distortion bound [39]. When embedding m-bit secret data, the sender should make the distortion between the cover image and the stego image as small as possible, which can be formulated as the following optimization problems:
(5)minDminDminm,n,ρ,subjecttoHp=m.In the actual embedding process, we first define a suitable distortion function and then combine the coding methods, e.g., STC, to embed data and limit the distortion as far as possible.For secret dataM=M1,M2,⋯,MmT∈0,1m, we use STC to find the closest codewords to cover in coset C of M as stego.
(6)EmbX,M=argminY∈CMDX,Y.The definition of cosetC is shown in (7).
(7)CM=Z∈0,1n∣HZ=M,where H∈0,1m×n is a parity-check matrix.As the stego is found in the codewordZ, the secret data can be extracted by multiplying the stego with H, as shown in (8).
(8)M=ExtY=HY.


## 3. Proposed Method

In Figure1, we show the framework of the proposed method for steganography in dynamic GIF images. First, we decompose dynamic GIF images into frames, each of which is a static GIF image. We design new distortion function for each frame. Based on the existing distortion functions, we obtain the initial embedding costs ρBij for each frame. Meanwhile, according to the characteristics of the GIF image palette and the difference between the current frame and the adjacent frames in dynamic GIF image, we calculate adjustment factors ρCij and ρVij for initial distortion function to construct a new distortion function to get the improved embedding costs ρ¯ij.Figure 1
The framework of dynamic GIF image steganography.If the payload containsm bits, we dynamically allocate the m bits to each frame. After identifying the distortion function and the payload for each frame, we obtain the stego GIF image by data embedding.


### 3.1. Distortion Function Initialization

We first design a steganography method for each frame of dynamic GIF images. By changing the index values in the index matrix, the secret data can be embedded into the cover with slight modification in the image content.For a 256-color dynamic GIF image, each index valueaij∈0,255 corresponds to an RGB vector (Rij, Gij, and Bij). We make an analogy between the RGB values of GIF images and the gray values of gray images. Thus, the algorithms of WOW, UNIWARD, HILL, etc. can be used to define the distortion function for each GIF frame.For each frame, we extract the matrix of RGB values from the GIF image palette separately. We use the spatial distortion function, i.e. HILL and UNWARD as initial distortion function to calculate the embedding costs of each pixel in RGB channels, denote the embedding cost of theith element in the jth frame in RGB channels as ρijR, ρijG, and ρijB. Therefore, we obtain an initial distortion function
(9)ρijB=ρijR+ρijG+ρijB3.


#### 3.1.1. Palette Sort Algorithm

As shown in Figure2, the GIF image palette is arranged out of order. Therefore, similar RGB vectors may be separated. For example, the difference between the RGB values corresponding to the index 2 and the index 100 is smaller than the difference between the RGB values corresponding to the index 2 and the index 3. To achieve better undetectability, the initial pixel value of the cover and the modified value of the stego should be as close as possible. Considering that Euclidean distance is the distance between two points in a multidimensional space, the RGB cube is a three-dimensional space. Hence, we rearrange the GIF image palette using the Euclidean distance as criterion.Figure 2
Demonstration of the palette format.We obtain the original paletteΘ and the original index matrix Ω from the GIF image. The original palette contains 256 RGB vectors. We denote each element in the palette as θa=Ra,Ga,Ba, in which a is index value, the range is 0 to 255.As the example shown in Figure3, we have θ4=0.02,0.03,0.02. By rearranging the original palette, we can obtain a sorted palette Θ¯ and a new index matrix Ω¯. We denote the new palette as θ¯a¯=Ra¯,Ga¯,Ba¯,a¯∈0,255. The steps of rearranging the palette are depicted as follows.Step 1.
We findl most frequently used RGB vectors from Ω and denote their index value as Φ=ϕ1,⋯,ϕl. For each vector corresponding to the index in Φ, we find a vector from Θ (excluding the indexes inΦ) that has the smallest distance. We denote the index values of these vectors as Φ’=ϕ1’,⋯,ϕl’.Step 2.
We generate a random numberarand from 0 to 255. Let θarand be the first row θ¯a¯a¯=0 in the new palette Θ¯. Meanwhile, we find the positions in Ω that have the index values equal to arand. On the same positions in Ω¯, we set the values as a¯. As the example in Figure 3, since arand=4, we assign θ4 as θ¯0. We find the positions in Ω that have the index values 4 and set the values on these positions in Ω¯, as 0.Step 3.
From the paletteΘ, we find a vector θa∗ that has the smallest Euclidean distance to θ¯a¯. The vector θa∗ must have not been used in previous steps. We set this vector as θ¯a¯+1 in the new palette Θ¯. We further find the positions in Ω that have the index values equal to a∗. On the same positions in Ω¯, we set the values as a¯+1. As the example in Figure 3, since θ4 has the smallest Euclidean distance with θ56, we assign θ56 as θ¯1. Meanwhile, we find the positions in Ω that have the index values 56 and set the values on these positions in Ω¯ as 1.Step 4.
If the index valuea∗ of θa∗ belongs to the set Φ or Φ’, say θϕ’l or θϕl, we must use θϕl or θϕ’l to fill the a¯+2-th vector in Θ¯. Otherwise, we use Step 3 to fill the a¯+2-th vector in Θ¯. As shown in Figure 3, as a∗=56 and 56=ϕ’1∈Φ’, we use θ3 (ϕ1=3) to fill the a¯+2-th vector in Θ¯. Meanwhile, we set the values in corresponding positions in Ω¯ as 3.Figure 3
The process of rearranging palette.


### 3.2. Distortion Function Optimization Based on Magnitude

In dynamic GIF image steganography, we embed data by modifying the index values. It is different from the steganography method for spatial images that embeds data by modifying pixel values. However, we can use the STC framework by optimizing the distortion functions defined for spatial images. Before using the ±1 embedding algorithm, we initialize the distortion function by state-of-the-art designs, e.g., WOW, UNIWARD, or HILL.For WOW, the distortion algorithm calculates a weighted differenceembedding suitability to get the embedding costs of this pixel, using the difference between the residual R of the cover image and the residual Ri that only the ith pixel is modified, as shown in (10),
(10)ξijk=Rk∗Rk−Rik↶,in which “∗” is the convolution operator, “↶” is an operator of rotating 180 degrees, and ξki is the embedding suitability, · is the absolute operator. Besides, Rk−Rki is calculated by
(11)Rk−Rik=Kk∗X−Kk∗Xi=Kk∗Xi′,where K is a filter, Kk the kth filter, and Xi is the matrix that only the ith pixel is modified, X’i is the matrix with the same size as the cover image X. When the modified amplitude is 1, the ith element of X’i is 1, while the others are all 0. The value of the weight difference of WOW depends on the modified amplitude and the filter. Since the calculation of the weight difference uses an absolute value, changing the pixel value in the forward direction (the embedding operation of +1) and changing the pixel value in reverse (the embedding operation of -1) have no distinction on the result.However, when embedding data in GIF, we must modify the index values. The modification would be result in the change of the RGB values. More importantly, the modifications of +1 and -1 have different impacts on the RGB values. As shown in Figure4, the index value of x5 is 5 and the corresponding R value is 0.42. When adding 1 to x5, the index value changes to 6, the corresponding R value changes to 0.26, and the modification amplitude is 0.16. When subtracting 1 from x5, the index value changes to 4, the corresponding R value changes to 0.41, and the modification amplitude is 0.01. For x6 with index value equal to 6, the corresponding R value is 0.26 and the modification amplitude is 0.16 when subtracting 1 from x6. Different operations on different index values would have different modification amplitudes on RGB values. Therefore, when hiding data into GIF, we should set different embedding costs for different operations on different index values.Figure 4
An example for different modified amplitude.According to this point, we calculate the modification amplitudes on RGB values when adjusting ±1 on index values and optimize the initial distortion function according to the modified amplitude. The pixels with less impact are assigned with small embedding costs, and the pixels with more impacts are assigned with large embedding costs.Accordingly, we propose to include an adjustment parameterδ called amplitude weight to manipulate the optimized proportion of the modification amplitude in the new distortion function. The setting of δ will be discussed in Section 4.1. Since the initial distortion functions are define for RGB channels, we provide the adjustment factors for three channels, respectively. In (12), ρC+ijR, ρC+ijG, and ρC+ijB are the optimization factors for the +1 embedding operations of the ith pixel in the jth frame in three color channels and ρC−ijR, ρC−ijG, and ρC−ijB are the optimization factors for the -1 embedding operations of ith pixel in the jth frame in three color channels. δ is the adjustment parameter called amplitude weight. r+ij, g+ij, and b+ij are the absolute difference of the RGB values of aij and (aij+1) and r−ij, g−ij, and b−ij are the absolute difference of the RGB values of aij and (aij−1).
(12)ρijC+R=δ×r+ij+255−δ255,ρijC−R=δ×r−ij+255−δ255,ρijC+G=δ×g+ij+255−δ255,ρijC−G=δ×g−ij+255−δ255,ρijC+B=δ×b+ij+255−δ255,ρijC−B=δ×b−ij+255−δ255.Combining three optimization factors with the initial distortion functions, we adjust the distortion function as (13).
(13)ρijT+=ρijC+RρijR+ρijC+RρijG+ρijC+RρijB3,ρijT−=ρijC−RρijR+ρijC−RρijG+ρijC−RρijB3.


### 3.3. Distortion Function Improvement Using the Correlation of Interframes

In spatial image steganography, the texture and edge regions are more appropriate for data hiding than the other regions, as it is more secure against the steganalysis. Most STC embedding methods assign these regions with low embedding costs. This principle can also be used for steganography in dynamic GIF images. As there are many frames in a dynamic GIF image, we also use the changes in interframes. When displaying animation effects, most of the successive frames have strong correlations, which can be found in Figure5.Figure 5
Three consecutive frames in the fifth dynamic GIF image in the dataset.We propose to integrate the correlations of interframes into distortion function optimization. The pixels that have larger changes in interframes would be assigned with smaller embedding costs. First, we calculate the motion differences of adjacent frames of each pixel. Then, we select the appropriate pixels according to these motion differences. After that, we set adjustment parameters to adjust the embedding costs of these pixels to achieve the adjustment factorρVij.For each pixel in dynamic GIF imageA, we calculate the difference between each frame and the next frame by (14).
(14)∆dij=∆Rij2+∆Gij2+∆Bij2,where Δdij is the difference between the ith pixel in the jth frame and the ith pixel in the (j+1)th frame. ΔRij is the absolute difference of Rij and Rij+1, ΔGij is the absolute difference of Gij and Gij+1, ΔBij is the absolute difference of Bij and Bij+1,i∈1,n,j∈1,t. n is the number of pixels in a frame and t is the number of frames in dynamic GIF image.As the adjacent pixels are related, we use the average value of the differences of the pixels in a3×3 block as the difference of the pixel in the center of the block. In order to better evaluate the degree of change in inter frames, we average the difference between the present and the previous frames and the difference between the present and the next frames. We use the average as the motion difference of adjacent frames, which is depicted in (15),
(15)dij=∆dij,j=1,∆dij−1+∆dij2,otherwise,∆dij,j=t,in which dij is the motion difference of the ith pixel in the jth frame, and Δdij is the difference between the ith pixel in the jth frame and the ith pixel in the (j+1)th frame.After calculating the interchanges of each pixel of the dynamic GIF image, we sort all pixels according to the motion difference and select the pixels with the topa% of large changes to decrease their embedding costs. Considering that changes exceeding 38 dB are imperceptible to the human eye, we combine the image content to select the pixels with changes below 38 dB to calculate the selection range adaptively.
(16)α=βdM−dT,where is dM the mean of the motion differences of the pixels with changes below 38 dB, dT the motion differences of the pixels with changes equal 38 dB, and the motion difference parameter β is empirically set as 0.2. We select the pixels with the top α% by (17)
(17)vij=dij,iftheithpixelinthejthframe∈α%,0,otherwise.Subsequently, we define the adjustment factor in (18) according to the correlation of interframes.
(18)ρijV=e−vij.Finally, we obtain the final distortion function(19)ρ¯+ij=ρijVρijC+,ρ¯−ij=ρijVρijC−.


### 3.4. Payload Allocation

In dynamic GIF image steganography, we calculate the embedding costs for each frame. There are more pixels with small embedding cost in some frames. Therefore, these frames can accommodate more secret data. In order to achieve a better security with the condition of a constant total payload, we assign each frame with different payload according to the characteristics of each frame itself.According to the calculation of the initial embedding costs and optimization factors, we get the optimized embedding costsρ¯ij for each pixel in dynamic GIF image. During data hiding, the whole distortion should satisfy the rate distortion bound in (20),
(20)minDminDminm,n∗t,ρ¯=∑i=1n∑j=1tρ¯ijp¯ij,subjectto∑i=1n∑j=1tHp¯=m,where n is the number of pixels in a frame and t is the number of frames in dynamic GIF image. ρ¯ij is the embedding cost of the ith pixel in the jth frame. p¯ij is the modification probability of the ith pixel in the jth frame. Hp¯ is a entropy function to calculate the payload based on the modification probability, which is depicted in (3). The modification probability p¯ij can be obtained according to the embedding cost ρ¯ij and a parameter λ. The parameter λ is obtained from the constraints of the modification probability and the payload of secret data in (20).After obtaining the distortion function, we input the embedding costs of all frames and the payload of secret data into the constraints in (20) to calculate the parameter λ. Accordingly, we obtain the modification probability of each frame based on the embedding costs and the parameter λ. Subsequently, embedding payload of each frame can be calculated by (21)
(21)mj=∑i=1nHp¯ij,j∈1,t.


## 3.1. Distortion Function Initialization

We first design a steganography method for each frame of dynamic GIF images. By changing the index values in the index matrix, the secret data can be embedded into the cover with slight modification in the image content.For a 256-color dynamic GIF image, each index valueaij∈0,255 corresponds to an RGB vector (Rij, Gij, and Bij). We make an analogy between the RGB values of GIF images and the gray values of gray images. Thus, the algorithms of WOW, UNIWARD, HILL, etc. can be used to define the distortion function for each GIF frame.For each frame, we extract the matrix of RGB values from the GIF image palette separately. We use the spatial distortion function, i.e. HILL and UNWARD as initial distortion function to calculate the embedding costs of each pixel in RGB channels, denote the embedding cost of theith element in the jth frame in RGB channels as ρijR, ρijG, and ρijB. Therefore, we obtain an initial distortion function
(9)ρijB=ρijR+ρijG+ρijB3.


### 3.1.1. Palette Sort Algorithm

As shown in Figure2, the GIF image palette is arranged out of order. Therefore, similar RGB vectors may be separated. For example, the difference between the RGB values corresponding to the index 2 and the index 100 is smaller than the difference between the RGB values corresponding to the index 2 and the index 3. To achieve better undetectability, the initial pixel value of the cover and the modified value of the stego should be as close as possible. Considering that Euclidean distance is the distance between two points in a multidimensional space, the RGB cube is a three-dimensional space. Hence, we rearrange the GIF image palette using the Euclidean distance as criterion.Figure 2
Demonstration of the palette format.We obtain the original paletteΘ and the original index matrix Ω from the GIF image. The original palette contains 256 RGB vectors. We denote each element in the palette as θa=Ra,Ga,Ba, in which a is index value, the range is 0 to 255.As the example shown in Figure3, we have θ4=0.02,0.03,0.02. By rearranging the original palette, we can obtain a sorted palette Θ¯ and a new index matrix Ω¯. We denote the new palette as θ¯a¯=Ra¯,Ga¯,Ba¯,a¯∈0,255. The steps of rearranging the palette are depicted as follows.Step 1.
We findl most frequently used RGB vectors from Ω and denote their index value as Φ=ϕ1,⋯,ϕl. For each vector corresponding to the index in Φ, we find a vector from Θ (excluding the indexes inΦ) that has the smallest distance. We denote the index values of these vectors as Φ’=ϕ1’,⋯,ϕl’.Step 2.
We generate a random numberarand from 0 to 255. Let θarand be the first row θ¯a¯a¯=0 in the new palette Θ¯. Meanwhile, we find the positions in Ω that have the index values equal to arand. On the same positions in Ω¯, we set the values as a¯. As the example in Figure 3, since arand=4, we assign θ4 as θ¯0. We find the positions in Ω that have the index values 4 and set the values on these positions in Ω¯, as 0.Step 3.
From the paletteΘ, we find a vector θa∗ that has the smallest Euclidean distance to θ¯a¯. The vector θa∗ must have not been used in previous steps. We set this vector as θ¯a¯+1 in the new palette Θ¯. We further find the positions in Ω that have the index values equal to a∗. On the same positions in Ω¯, we set the values as a¯+1. As the example in Figure 3, since θ4 has the smallest Euclidean distance with θ56, we assign θ56 as θ¯1. Meanwhile, we find the positions in Ω that have the index values 56 and set the values on these positions in Ω¯ as 1.Step 4.
If the index valuea∗ of θa∗ belongs to the set Φ or Φ’, say θϕ’l or θϕl, we must use θϕl or θϕ’l to fill the a¯+2-th vector in Θ¯. Otherwise, we use Step 3 to fill the a¯+2-th vector in Θ¯. As shown in Figure 3, as a∗=56 and 56=ϕ’1∈Φ’, we use θ3 (ϕ1=3) to fill the a¯+2-th vector in Θ¯. Meanwhile, we set the values in corresponding positions in Ω¯ as 3.Figure 3
The process of rearranging palette.


## 3.1.1. Palette Sort Algorithm

As shown in Figure2, the GIF image palette is arranged out of order. Therefore, similar RGB vectors may be separated. For example, the difference between the RGB values corresponding to the index 2 and the index 100 is smaller than the difference between the RGB values corresponding to the index 2 and the index 3. To achieve better undetectability, the initial pixel value of the cover and the modified value of the stego should be as close as possible. Considering that Euclidean distance is the distance between two points in a multidimensional space, the RGB cube is a three-dimensional space. Hence, we rearrange the GIF image palette using the Euclidean distance as criterion.Figure 2
Demonstration of the palette format.We obtain the original paletteΘ and the original index matrix Ω from the GIF image. The original palette contains 256 RGB vectors. We denote each element in the palette as θa=Ra,Ga,Ba, in which a is index value, the range is 0 to 255.As the example shown in Figure3, we have θ4=0.02,0.03,0.02. By rearranging the original palette, we can obtain a sorted palette Θ¯ and a new index matrix Ω¯. We denote the new palette as θ¯a¯=Ra¯,Ga¯,Ba¯,a¯∈0,255. The steps of rearranging the palette are depicted as follows.Step 1.
We findl most frequently used RGB vectors from Ω and denote their index value as Φ=ϕ1,⋯,ϕl. For each vector corresponding to the index in Φ, we find a vector from Θ (excluding the indexes inΦ) that has the smallest distance. We denote the index values of these vectors as Φ’=ϕ1’,⋯,ϕl’.Step 2.
We generate a random numberarand from 0 to 255. Let θarand be the first row θ¯a¯a¯=0 in the new palette Θ¯. Meanwhile, we find the positions in Ω that have the index values equal to arand. On the same positions in Ω¯, we set the values as a¯. As the example in Figure 3, since arand=4, we assign θ4 as θ¯0. We find the positions in Ω that have the index values 4 and set the values on these positions in Ω¯, as 0.Step 3.
From the paletteΘ, we find a vector θa∗ that has the smallest Euclidean distance to θ¯a¯. The vector θa∗ must have not been used in previous steps. We set this vector as θ¯a¯+1 in the new palette Θ¯. We further find the positions in Ω that have the index values equal to a∗. On the same positions in Ω¯, we set the values as a¯+1. As the example in Figure 3, since θ4 has the smallest Euclidean distance with θ56, we assign θ56 as θ¯1. Meanwhile, we find the positions in Ω that have the index values 56 and set the values on these positions in Ω¯ as 1.Step 4.
If the index valuea∗ of θa∗ belongs to the set Φ or Φ’, say θϕ’l or θϕl, we must use θϕl or θϕ’l to fill the a¯+2-th vector in Θ¯. Otherwise, we use Step 3 to fill the a¯+2-th vector in Θ¯. As shown in Figure 3, as a∗=56 and 56=ϕ’1∈Φ’, we use θ3 (ϕ1=3) to fill the a¯+2-th vector in Θ¯. Meanwhile, we set the values in corresponding positions in Ω¯ as 3.Figure 3
The process of rearranging palette.


## 3.2. Distortion Function Optimization Based on Magnitude

In dynamic GIF image steganography, we embed data by modifying the index values. It is different from the steganography method for spatial images that embeds data by modifying pixel values. However, we can use the STC framework by optimizing the distortion functions defined for spatial images. Before using the ±1 embedding algorithm, we initialize the distortion function by state-of-the-art designs, e.g., WOW, UNIWARD, or HILL.For WOW, the distortion algorithm calculates a weighted differenceembedding suitability to get the embedding costs of this pixel, using the difference between the residual R of the cover image and the residual Ri that only the ith pixel is modified, as shown in (10),
(10)ξijk=Rk∗Rk−Rik↶,in which “∗” is the convolution operator, “↶” is an operator of rotating 180 degrees, and ξki is the embedding suitability, · is the absolute operator. Besides, Rk−Rki is calculated by
(11)Rk−Rik=Kk∗X−Kk∗Xi=Kk∗Xi′,where K is a filter, Kk the kth filter, and Xi is the matrix that only the ith pixel is modified, X’i is the matrix with the same size as the cover image X. When the modified amplitude is 1, the ith element of X’i is 1, while the others are all 0. The value of the weight difference of WOW depends on the modified amplitude and the filter. Since the calculation of the weight difference uses an absolute value, changing the pixel value in the forward direction (the embedding operation of +1) and changing the pixel value in reverse (the embedding operation of -1) have no distinction on the result.However, when embedding data in GIF, we must modify the index values. The modification would be result in the change of the RGB values. More importantly, the modifications of +1 and -1 have different impacts on the RGB values. As shown in Figure4, the index value of x5 is 5 and the corresponding R value is 0.42. When adding 1 to x5, the index value changes to 6, the corresponding R value changes to 0.26, and the modification amplitude is 0.16. When subtracting 1 from x5, the index value changes to 4, the corresponding R value changes to 0.41, and the modification amplitude is 0.01. For x6 with index value equal to 6, the corresponding R value is 0.26 and the modification amplitude is 0.16 when subtracting 1 from x6. Different operations on different index values would have different modification amplitudes on RGB values. Therefore, when hiding data into GIF, we should set different embedding costs for different operations on different index values.Figure 4
An example for different modified amplitude.According to this point, we calculate the modification amplitudes on RGB values when adjusting ±1 on index values and optimize the initial distortion function according to the modified amplitude. The pixels with less impact are assigned with small embedding costs, and the pixels with more impacts are assigned with large embedding costs.Accordingly, we propose to include an adjustment parameterδ called amplitude weight to manipulate the optimized proportion of the modification amplitude in the new distortion function. The setting of δ will be discussed in Section 4.1. Since the initial distortion functions are define for RGB channels, we provide the adjustment factors for three channels, respectively. In (12), ρC+ijR, ρC+ijG, and ρC+ijB are the optimization factors for the +1 embedding operations of the ith pixel in the jth frame in three color channels and ρC−ijR, ρC−ijG, and ρC−ijB are the optimization factors for the -1 embedding operations of ith pixel in the jth frame in three color channels. δ is the adjustment parameter called amplitude weight. r+ij, g+ij, and b+ij are the absolute difference of the RGB values of aij and (aij+1) and r−ij, g−ij, and b−ij are the absolute difference of the RGB values of aij and (aij−1).
(12)ρijC+R=δ×r+ij+255−δ255,ρijC−R=δ×r−ij+255−δ255,ρijC+G=δ×g+ij+255−δ255,ρijC−G=δ×g−ij+255−δ255,ρijC+B=δ×b+ij+255−δ255,ρijC−B=δ×b−ij+255−δ255.Combining three optimization factors with the initial distortion functions, we adjust the distortion function as (13).
(13)ρijT+=ρijC+RρijR+ρijC+RρijG+ρijC+RρijB3,ρijT−=ρijC−RρijR+ρijC−RρijG+ρijC−RρijB3.


## 3.3. Distortion Function Improvement Using the Correlation of Interframes

In spatial image steganography, the texture and edge regions are more appropriate for data hiding than the other regions, as it is more secure against the steganalysis. Most STC embedding methods assign these regions with low embedding costs. This principle can also be used for steganography in dynamic GIF images. As there are many frames in a dynamic GIF image, we also use the changes in interframes. When displaying animation effects, most of the successive frames have strong correlations, which can be found in Figure5.Figure 5
Three consecutive frames in the fifth dynamic GIF image in the dataset.We propose to integrate the correlations of interframes into distortion function optimization. The pixels that have larger changes in interframes would be assigned with smaller embedding costs. First, we calculate the motion differences of adjacent frames of each pixel. Then, we select the appropriate pixels according to these motion differences. After that, we set adjustment parameters to adjust the embedding costs of these pixels to achieve the adjustment factorρVij.For each pixel in dynamic GIF imageA, we calculate the difference between each frame and the next frame by (14).
(14)∆dij=∆Rij2+∆Gij2+∆Bij2,where Δdij is the difference between the ith pixel in the jth frame and the ith pixel in the (j+1)th frame. ΔRij is the absolute difference of Rij and Rij+1, ΔGij is the absolute difference of Gij and Gij+1, ΔBij is the absolute difference of Bij and Bij+1,i∈1,n,j∈1,t. n is the number of pixels in a frame and t is the number of frames in dynamic GIF image.As the adjacent pixels are related, we use the average value of the differences of the pixels in a3×3 block as the difference of the pixel in the center of the block. In order to better evaluate the degree of change in inter frames, we average the difference between the present and the previous frames and the difference between the present and the next frames. We use the average as the motion difference of adjacent frames, which is depicted in (15),
(15)dij=∆dij,j=1,∆dij−1+∆dij2,otherwise,∆dij,j=t,in which dij is the motion difference of the ith pixel in the jth frame, and Δdij is the difference between the ith pixel in the jth frame and the ith pixel in the (j+1)th frame.After calculating the interchanges of each pixel of the dynamic GIF image, we sort all pixels according to the motion difference and select the pixels with the topa% of large changes to decrease their embedding costs. Considering that changes exceeding 38 dB are imperceptible to the human eye, we combine the image content to select the pixels with changes below 38 dB to calculate the selection range adaptively.
(16)α=βdM−dT,where is dM the mean of the motion differences of the pixels with changes below 38 dB, dT the motion differences of the pixels with changes equal 38 dB, and the motion difference parameter β is empirically set as 0.2. We select the pixels with the top α% by (17)
(17)vij=dij,iftheithpixelinthejthframe∈α%,0,otherwise.Subsequently, we define the adjustment factor in (18) according to the correlation of interframes.
(18)ρijV=e−vij.Finally, we obtain the final distortion function(19)ρ¯+ij=ρijVρijC+,ρ¯−ij=ρijVρijC−.


## 3.4. Payload Allocation

In dynamic GIF image steganography, we calculate the embedding costs for each frame. There are more pixels with small embedding cost in some frames. Therefore, these frames can accommodate more secret data. In order to achieve a better security with the condition of a constant total payload, we assign each frame with different payload according to the characteristics of each frame itself.According to the calculation of the initial embedding costs and optimization factors, we get the optimized embedding costsρ¯ij for each pixel in dynamic GIF image. During data hiding, the whole distortion should satisfy the rate distortion bound in (20),
(20)minDminDminm,n∗t,ρ¯=∑i=1n∑j=1tρ¯ijp¯ij,subjectto∑i=1n∑j=1tHp¯=m,where n is the number of pixels in a frame and t is the number of frames in dynamic GIF image. ρ¯ij is the embedding cost of the ith pixel in the jth frame. p¯ij is the modification probability of the ith pixel in the jth frame. Hp¯ is a entropy function to calculate the payload based on the modification probability, which is depicted in (3). The modification probability p¯ij can be obtained according to the embedding cost ρ¯ij and a parameter λ. The parameter λ is obtained from the constraints of the modification probability and the payload of secret data in (20).After obtaining the distortion function, we input the embedding costs of all frames and the payload of secret data into the constraints in (20) to calculate the parameter λ. Accordingly, we obtain the modification probability of each frame based on the embedding costs and the parameter λ. Subsequently, embedding payload of each frame can be calculated by (21)
(21)mj=∑i=1nHp¯ij,j∈1,t.


## 4. Experimental Results

To verify the proposed method, we have conducted many experiments. Two dynamic GIF image datasets are constructed, i.e., the SPORTBase and the HAPPYBase. Each database contains 500 dynamic GIF images, and each image has 20 frames, i.e., 10,000 static GIF images in each dataset. They are all color dynamic images with 8-bit index values. The SPORTBase are football games downloaded fromhttps://www.zhibo8.cc/. The HAPPYBase are emoticons from https://www.soogif.com/, https://www.sina.com.cn/ and other websites. Both are available in https://github.com/jzlin1997/GIF-Image-Steganography.We use HILL, UNIWARD, and WOW as the initial distortion function in the proposed method. After optimizing the initial distortion function and allocating the embedding payloads, we generate a new steganography method for dynamic GIF images. We name the proposed steganography based on improved HILL, UNIWARD and WOW as Gp-HILL, Gp-UNIWARD and Gp-WOW, respectively.We use the steganalysis tools of the state-of-the-art SPAM feature set [19] and SRM feature set [18] with the ensemble classifiers [22]. We obtain the RGB values of stego GIF images to calculate the gray values and extract SPAM features from the gray values. Half of the cover and stego feature sets are used for training, and the rest are for testing. We use the minimal total error PE with equal priors achieved on the testing sets as the criterion to evaluate the performances of the feature sets. In (22), PFA is the false alarm rate and PMD is the missed detection rate. The average of PE by 10 random tests is used to evaluate the performance.
(22)PE=minPFAPFA+PMD2.In Section4.1, we discuss the adjustment parameter, i.e., the amplitude weight. Based on appropriate amplitude weight, we find a suitable value of the motion difference parameter. Subsequently, we compare our proposed method with the basic method using initial distortion functions and Shi et al. [37] in Section 4.2 and Section 4.3. We give a subjective evaluation of the stego image in Section 4.2 and a specific analysis of undetectability in Section 4.3.


### 4.1. Parameter Determination

In Section3.2, we have analyzed that the modification amplitude is an important factor for distortion function. Considering that the modification amplitudes on pixel value of different operations are different, we not only embed the data in texture regions but also embed the data in the pixels with small modification amplitude. We define an adjustment parameter δ called amplitude weight to adjust the optimized proportion of the modification amplitude in the new distortion function. If δ is too large, the embedding costs of the pixels with small modification but in smooth region would become much smaller. It will ignore the effects of embedding in texture regions.We use Gp-HILL and Gp-UNIWARD to embed 0.15 bpp into dynamic GIF images in SPORTBase with different values ofδ. The SPAM errors are shown in Figures 6(a) and 6(b). The results indicate that the largest testing errors can be achieved when δ=1. Therefore, we set δ=1.Figure 6
Testing error with respect toδ. (a) Gp-HILL in SPORTBase. (b) Gp-UNIWARD in SPORTBase.
(a)(b)Based on the identified amplitude weightδ, we look for the optimal parameter β of motion difference in the SPORTBase. We use Gp-HILL and Gp-UNIWARD to embed 0.15 bpp into GIF images and vary the values of β, respectively. The results shown in Figure 7 indicate that the largest testing errors can be achieved when β=0.2.Figure 7
Testing error with respect toβ. (a) Gp-HILL in SPORTBase. (b) Gp-UNIWARD in SPORTBase.
(a)(b)


### 4.2. Image Quality

In Figure8, we compare quality of the stego frames by the proposed method and the other methods. We use HILL as the initial distortion function. The stegos are generated by the initial function, the function in [37] and ours. The embedding payload is 0.2 bpp. Figure 8(a) shows the original frame. Figures 8(b)–8(d) shows the stegos generated by different distortion functions. Traditional distortion functions used for GIF embedding only consider the embedding in texture regions, which always ignore the differences of modification amplitude. Therefore, there are some drawbacks like the black points appearing in the blue coat in Figure 8(b). However, the distortion function in [37] focuses on embedding secret data into the pixels with a smaller modification amplitude, a large piece of white in the blue coat in Figure 8(c). The results show that the proposed method achieves a better quality.Figure 8
Comparison of stego images. (a) The original frame. (b) Stego generated by initial distortion function. (c) The stego by Shi et al. [37]. (d) The stego by us.
(a)(b)(c)(d)Meanwhile, based on the HILL, we calculate the mean PSNR (peak-signal-to-noise ratio) of the stego generated by initial distortion function, the stego by Shi et al. and our Gp-HILL in Table1. As shown in Table 1, all the PSNR of the stego generated by Gp-HILL has been improved. For example, the PSNR of the stego generated by Gp-HILL is 40.01 when the embedding payload is 0.15 bpp. Compared with the PSNR of the stego generated by the basic method using HILL, our method can improve 5.11. Moreover, from 0.05 bpp to 0.2 bpp, the PSNR of the stego generated by Gp-HILL has reached an undetectable level by the human eye.Table 1
Comparison of the PSNR results between the basic method using HILL, Shi’s method using HILL, and our GP-HILL in SPORTBase.
MethodsPayload (bpp)0.050.10.150.20.25Basic (HILL)40.5137.0034.9033.3732.18Shi et al.’s (HILL)31.8330.7929.7028.6027.59Gp-HILL45.7142.1340.0138.4637.27


### 4.3. Security against Steganalysis

We have also conducted many experiments to verify the capabilities of countering steganalysis. The proposed Gp-HILL, Gp-UNIWARD, and Gp-WOW are used to hide secret data into the dynamic GIF images in SPORTBase and HAPPYBase. Five different payloads from 0.05 bpp to 0.25 bpp are used.We use SPAM and SRM to extract features from covers and stegos to evaluate the security of the proposed method. The proposed method is compared with the basic method, Shi et al.’s method in [37]. The basic method and Shi et al.’s method use HILL, UNIWARD, and WOW as initial distortion function.In Table2 and Figures 9(a)–9(f), we show the steganalysis results of data hiding in SPORTBase. Table 2 indicated that the proposed method outperforms the basic methods and the Shi et al.’s method using three distortion functions with SPAM feature. For example, the testing error of Gp-HILL with SPAM is 0.3414 when the embedding payload is 0.25 bpp. It can improve 0.0465 comparing the testing error of the basic method with SPAM using HILL. With the increase of embedding payload, the improvement of testing error also increases. Further, Table 2 shows all the testing errors obtained by the proposed method with SRM are higher than the basic method from 0.05 bpp to 0.5 bpp and are higher than the Shi et al.’s method from 0.05 bpp to 0.15 bpp. When payload becomes larger, embedding in texture area has lost its effect, such as the testing error of Gp-HILL with SRM is 0.0018 when the embedding payload is 0.25 bpp, therefore, the testing errors obtained by the proposed method with SRM are lower than the Shi et al.’s method. But the image quality of Shi et al.’s method is worse. It is shown the proposed steganography method could obtain improvements in the performance of steganalysis.Table 2
Comparison of the steganalysis results in SPORTBase.
FeatureMethodsPayload (bpp)0.050.10.150.20.25SPAMBasic (HILL)0.43600.36640.29490.22730.1672Shi et al.’s (HILL)0.36740.28100.20390.14180.1034Ours (HILL)0.45160.39630.34140.28750.2367Basic (UNIWARD)0.44550.38290.31990.25430.1932Shi et al.’s (UNIWARD)0.40130.31610.24290.17660.1281Ours (UNIWARD)0.45630.40640.35690.30190.2489Basic (WOW)0.43620.36330.29340.22800.1718Shi et al.’s (WOW)0.40430.32490.25070.17950.1292Ours (WOW)0.44950.39100.33410.28030.2267SRMBasic (HILL)0.17230.04370.01070.00390.0018Shi et al.’s (HILL)0.09610.04400.03180.02870.0272Ours (HILL)0.23560.09820.03950.01650.0077Basic (UNIWARD)0.19500.04980.01250.00360.0017Shi et al.’s (UNIWARD)0.09220.04680.03110.02650.0238Ours (UNIWARD)0.27710.11230.04330.01750.0071Basic (WOW)0.18040.04410.01050.00360.0016Shi et al.’s (WOW)0.09440.04650.03160.02600.0242Ours (WOW)0.26160.10800.04100.01800.0085Figure 9
Comparison of the steganalysis results in SPORTBase. (a) Gp-HILL with SPAM. (b) Gp-UNIWARD with SRM. (c) Gp-UNIWARD with SPAM. (d) Gp-UNIWARD with SRM. (e) Gp-WOW with SPAM. (f) Gp-WOW with SRM.
(a)(b)(c)(d)(e)(f)To further evaluate the performance of the proposed method, we do experiments using HAPPYBase. Figures10(a) and 10(b) and Table 3 shows the comparisons of testing errors between Gp-HILL, the basic method, and Shi et al.’s method using HILL in HAPPYBase with SPAM and SRM. As shown in Table 3, the testing errors of the proposed method are higher than the basic method and the Shi et al.’s method in all situation in HAPPYBase, which has richer texture than SPORTBase. The results indicate the proposed method for dynamic GIF images steganography could achieve better performance on resisting the modern steganalysis and verify that the parameters are also appropriate for other databases.Figure 10
Comparison of the steganalysis results in HAPPYBase. (a) Gp-HILL with SPAM. (b) Gp-UNIWARD with SRM.
(a)(b)Table 3
Comparison of the steganalysis results in HAPPYBase.
FeatureMethodsPayload (bpp)0.050.10.150.20.25SPAMBasic (HILL)0.44730.39560.35450.31800.2829Shi et al.’s (HILL)0.20800.20070.18620.16540.1488Ours (HILL)0.45470.41600.38350.35380.3238SRMBasic (HILL)0.15440.06620.03200.01840.0119Shi et al.’s (HILL)0.04900.03330.02600.02250.0213Ours (HILL)0.23260.12120.06590.03800.0246


## 4.1. Parameter Determination

In Section3.2, we have analyzed that the modification amplitude is an important factor for distortion function. Considering that the modification amplitudes on pixel value of different operations are different, we not only embed the data in texture regions but also embed the data in the pixels with small modification amplitude. We define an adjustment parameter δ called amplitude weight to adjust the optimized proportion of the modification amplitude in the new distortion function. If δ is too large, the embedding costs of the pixels with small modification but in smooth region would become much smaller. It will ignore the effects of embedding in texture regions.We use Gp-HILL and Gp-UNIWARD to embed 0.15 bpp into dynamic GIF images in SPORTBase with different values ofδ. The SPAM errors are shown in Figures 6(a) and 6(b). The results indicate that the largest testing errors can be achieved when δ=1. Therefore, we set δ=1.Figure 6
Testing error with respect toδ. (a) Gp-HILL in SPORTBase. (b) Gp-UNIWARD in SPORTBase.
(a)(b)Based on the identified amplitude weightδ, we look for the optimal parameter β of motion difference in the SPORTBase. We use Gp-HILL and Gp-UNIWARD to embed 0.15 bpp into GIF images and vary the values of β, respectively. The results shown in Figure 7 indicate that the largest testing errors can be achieved when β=0.2.Figure 7
Testing error with respect toβ. (a) Gp-HILL in SPORTBase. (b) Gp-UNIWARD in SPORTBase.
(a)(b)


## 4.2. Image Quality

In Figure8, we compare quality of the stego frames by the proposed method and the other methods. We use HILL as the initial distortion function. The stegos are generated by the initial function, the function in [37] and ours. The embedding payload is 0.2 bpp. Figure 8(a) shows the original frame. Figures 8(b)–8(d) shows the stegos generated by different distortion functions. Traditional distortion functions used for GIF embedding only consider the embedding in texture regions, which always ignore the differences of modification amplitude. Therefore, there are some drawbacks like the black points appearing in the blue coat in Figure 8(b). However, the distortion function in [37] focuses on embedding secret data into the pixels with a smaller modification amplitude, a large piece of white in the blue coat in Figure 8(c). The results show that the proposed method achieves a better quality.Figure 8
Comparison of stego images. (a) The original frame. (b) Stego generated by initial distortion function. (c) The stego by Shi et al. [37]. (d) The stego by us.
(a)(b)(c)(d)Meanwhile, based on the HILL, we calculate the mean PSNR (peak-signal-to-noise ratio) of the stego generated by initial distortion function, the stego by Shi et al. and our Gp-HILL in Table1. As shown in Table 1, all the PSNR of the stego generated by Gp-HILL has been improved. For example, the PSNR of the stego generated by Gp-HILL is 40.01 when the embedding payload is 0.15 bpp. Compared with the PSNR of the stego generated by the basic method using HILL, our method can improve 5.11. Moreover, from 0.05 bpp to 0.2 bpp, the PSNR of the stego generated by Gp-HILL has reached an undetectable level by the human eye.Table 1
Comparison of the PSNR results between the basic method using HILL, Shi’s method using HILL, and our GP-HILL in SPORTBase.
MethodsPayload (bpp)0.050.10.150.20.25Basic (HILL)40.5137.0034.9033.3732.18Shi et al.’s (HILL)31.8330.7929.7028.6027.59Gp-HILL45.7142.1340.0138.4637.27


## 4.3. Security against Steganalysis

We have also conducted many experiments to verify the capabilities of countering steganalysis. The proposed Gp-HILL, Gp-UNIWARD, and Gp-WOW are used to hide secret data into the dynamic GIF images in SPORTBase and HAPPYBase. Five different payloads from 0.05 bpp to 0.25 bpp are used.We use SPAM and SRM to extract features from covers and stegos to evaluate the security of the proposed method. The proposed method is compared with the basic method, Shi et al.’s method in [37]. The basic method and Shi et al.’s method use HILL, UNIWARD, and WOW as initial distortion function.In Table2 and Figures 9(a)–9(f), we show the steganalysis results of data hiding in SPORTBase. Table 2 indicated that the proposed method outperforms the basic methods and the Shi et al.’s method using three distortion functions with SPAM feature. For example, the testing error of Gp-HILL with SPAM is 0.3414 when the embedding payload is 0.25 bpp. It can improve 0.0465 comparing the testing error of the basic method with SPAM using HILL. With the increase of embedding payload, the improvement of testing error also increases. Further, Table 2 shows all the testing errors obtained by the proposed method with SRM are higher than the basic method from 0.05 bpp to 0.5 bpp and are higher than the Shi et al.’s method from 0.05 bpp to 0.15 bpp. When payload becomes larger, embedding in texture area has lost its effect, such as the testing error of Gp-HILL with SRM is 0.0018 when the embedding payload is 0.25 bpp, therefore, the testing errors obtained by the proposed method with SRM are lower than the Shi et al.’s method. But the image quality of Shi et al.’s method is worse. It is shown the proposed steganography method could obtain improvements in the performance of steganalysis.Table 2
Comparison of the steganalysis results in SPORTBase.
FeatureMethodsPayload (bpp)0.050.10.150.20.25SPAMBasic (HILL)0.43600.36640.29490.22730.1672Shi et al.’s (HILL)0.36740.28100.20390.14180.1034Ours (HILL)0.45160.39630.34140.28750.2367Basic (UNIWARD)0.44550.38290.31990.25430.1932Shi et al.’s (UNIWARD)0.40130.31610.24290.17660.1281Ours (UNIWARD)0.45630.40640.35690.30190.2489Basic (WOW)0.43620.36330.29340.22800.1718Shi et al.’s (WOW)0.40430.32490.25070.17950.1292Ours (WOW)0.44950.39100.33410.28030.2267SRMBasic (HILL)0.17230.04370.01070.00390.0018Shi et al.’s (HILL)0.09610.04400.03180.02870.0272Ours (HILL)0.23560.09820.03950.01650.0077Basic (UNIWARD)0.19500.04980.01250.00360.0017Shi et al.’s (UNIWARD)0.09220.04680.03110.02650.0238Ours (UNIWARD)0.27710.11230.04330.01750.0071Basic (WOW)0.18040.04410.01050.00360.0016Shi et al.’s (WOW)0.09440.04650.03160.02600.0242Ours (WOW)0.26160.10800.04100.01800.0085Figure 9
Comparison of the steganalysis results in SPORTBase. (a) Gp-HILL with SPAM. (b) Gp-UNIWARD with SRM. (c) Gp-UNIWARD with SPAM. (d) Gp-UNIWARD with SRM. (e) Gp-WOW with SPAM. (f) Gp-WOW with SRM.
(a)(b)(c)(d)(e)(f)To further evaluate the performance of the proposed method, we do experiments using HAPPYBase. Figures10(a) and 10(b) and Table 3 shows the comparisons of testing errors between Gp-HILL, the basic method, and Shi et al.’s method using HILL in HAPPYBase with SPAM and SRM. As shown in Table 3, the testing errors of the proposed method are higher than the basic method and the Shi et al.’s method in all situation in HAPPYBase, which has richer texture than SPORTBase. The results indicate the proposed method for dynamic GIF images steganography could achieve better performance on resisting the modern steganalysis and verify that the parameters are also appropriate for other databases.Figure 10
Comparison of the steganalysis results in HAPPYBase. (a) Gp-HILL with SPAM. (b) Gp-UNIWARD with SRM.
(a)(b)Table 3
Comparison of the steganalysis results in HAPPYBase.
FeatureMethodsPayload (bpp)0.050.10.150.20.25SPAMBasic (HILL)0.44730.39560.35450.31800.2829Shi et al.’s (HILL)0.20800.20070.18620.16540.1488Ours (HILL)0.45470.41600.38350.35380.3238SRMBasic (HILL)0.15440.06620.03200.01840.0119Shi et al.’s (HILL)0.04900.03330.02600.02250.0213Ours (HILL)0.23260.12120.06590.03800.0246


## 5. Conclusions

The paper presents a new steganography method for the dynamic GIF images based on STC framework. We rearrange the palette and calculate the modification amplitudes on pixel values according to the mapping relationships between index values and RGB values. According to the modification amplitudes on pixel values, we calculate the adjustment factors for each color channel. Considering the strong correlation of interframes, we use the motion difference of adjacent frames as an adjustment factor to adjust embedding costs. Combining adjustment factors, we design a new method of distortion function specification. Besides, with the embedding probabilities on different frames, we also assign different payloads for each frame to achieve higher security. The experimental results show that the proposed method has a better performance than previous works.



---

*Source: 8812087-2020-08-28.xml*