Constructive Texture Steganography Based on Compression
Mapping of Secret Messages

This paper proposes a new constructive texture synthesis steganographic scheme by compressing original secret messages. First, we divide the original message into multiple bit blocks, which are transferred to decimal values and compressed into small decimal values by recording their interval sign characters. Then, a candidate pattern is generated by combining the given source pattern and boundary extension algorithm. Furthermore, we segment the candidate pattern into multiple candidate patches and use affine transformation algorithm to locate secret positions on a blank canvas, which are used to hide the sign characters by mapping the candidate patches. Finally, we select the candidate patches with minimal mean square error to represent secret bits to generate stego image by image quilting. Extensive experiments demonstrate that compared with existing texture steganographic methods, our method has a better visual quality, higher embedding capacity and security performance, while maintaining strong anti-steganalysis capability.


Introduction
Steganography [Fridrich (2009) , Filler, Judas andFridrich (2011), Li, Wu, Zhang et al. (2018)] aims to embed secret messages into digital media, such as digital images, video or audio files, for covert communication. In order to minimize the changes caused by secret information embedding, researchers employ coding methods to achieve fewer changes with embedding the same amount of secret information, such as wet paper coding [Fridrich, Goljan, Lisonek et al. (2005)] and double-layer steganography method [Zhang, Zhang and Wang (2007)]. Code-based Steganography [Westfeld (2001)] can theoretically be closer to the performance limitation of steganographic distortion, but, in practical applications, it is not satisfactory when resisting specific steganalysis with highdimensional feature model [Li, Wu, Lei et al. (2015)]. So, some researchers try to develop secure steganography [Filler, Judas and Fridrich (2011)] with high antisteganalysis capability, for example, coverless steganography [Zhang, Su, Li et al. (2019)] and deep learning-based secure steganography [Yang, Ruan, Huang et al. (2019), Meng, Cui and Yuan (2018)]. Nevertheless, since steganography mainly hides data into image elements (pixels or DCT (Discrete Cosine Transform) coefficients), the distribution of image modes usually change after performing steganography, even if for a low embedding capacity. This offers the opportunity for adversary to attack the methods.
Considering the aforementioned discussion, some researchers employ the textural similarity of texture image to directly generate stego image [Qian, Pan, Li et al. (2018), Zhou, Qiu, Li et al. (2018)]. The secret messages are mapped to some blocks of stego image. We term this scheme as "constructive steganography". In fact, constructive steganography hides secret message during reconstructing stego image. It directly generate stego image instead of modifying the cover image, and thus has a higher security performance.
Constructive steganography is usually documented two categories: texture constructive scheme and texture synthesis scheme. Regarding the texture constructive scheme, Qian et al. [Qian, Pan, Li et al. (2018)] hide the secret information by generating water-like textures, it can be visually perceived due to containing much unnatural texture. Regarding the texture synthesis scheme, Otori et al. [Otori and Kuriyama (2009)] firstly proposes a texture stitching scheme, which masks the local binary pixels that express secret information by using texture stitching method. However, this scheme may cause attacker's attention due to inferior masking mechanism. In order to avoid this problem, Wu et al. [Wu and Wang (2014)] hide secret information by using patch stitching. In this scheme, the source pattern is divided into overlapping patches and the secret message are embedded during reorganizing the approximate patches. Although Wu's method provides a high embedding payload, it has been verified by Zhou's comment [Zhou, Chen, Zhang et al. (2017)] to have unsafe performance and low visual quality for stego images. In addition, Du et al. [Du, Wang, Zhao et al. (2019)] employ quasi-affine transform on finite integer mesh to resist Zhou's attack method [Zhou, Chen, Zhang et al. (2017)] and further improve steganographic security. Qian et al. [Qian, Huang, Li et al. (2018)] design new boundary generation method to resist a specified attack aiming at patch stitching-based steganography. Unfortunately, these schemes still do not show enough superiority, especially for the visual quality, key security, and anti-steganalysis capability, keeping a large improvement gap.
Facing the aforementioned problems, we make the following novel contributions in the context of constructive texture steganography: We propose a new solution for constructive steganography, which can not only hide high payload without modifying the original texture image but also ensure that the stego images have a significant superior security performance.
The proposed new solution achieves high embedding capacity by compression mapping for original secret messages. The stego images can be synthesized step by step by searching the candidate patches with the minor mean square error. Since the proposed scheme effectively narrows the visual gap among synthesized patches, the visual quality can be thus further improved. Comprehensive experiments are performed over different textural images and the experimental results demonstrate that our solution significantly outperforms existing texture steganography methods in terms of visual quality, embedding capacity, security performance and anti-steganalysis capability.
The rest of this paper is organized as follows. Section 2 introduces the related work. The detailed procedure of our proposed scheme is shown in Section 3. We perform comprehensive experiments to evaluate the performance of proposed scheme, and present the results and corresponding discussions in Section 4. Finally, Section 5 concludes the paper.

Related work
Texture synthesis is a technology that uses a source texture pattern to generate a larger sized pattern with similar appearance. Wu et al. [Wu and Wang (2014)] firstly designed a new method to hide secret message using patch stitching. In Wu's scheme, they defined the basic unit as a "patch", which contains a kernel region and a boundary region. The source pattern is divided into multiple non-overlapping kernels with K w ×K h so that it can be recovered completely once these non-overlapping kernels are obtained. Then, they expanded each kernel into patch. If a kernel is located at the boundary of source pattern, the mirror symmetry method is used to implemented this processing. Finally, the extended source pattern were segmented into multiple candidate patches using the raster scanning. With a secret key, the data hider can randomly distribute all overlapping patches into a blank canvas. With image quilt technology [Efros and Freeman (2001)], the remaining patches in blank canvas were further filled by the patches that have the same ranks of mean square error (MSE) with the secret message. When the blank canvas are filled completely, it can be finally considered as stego image.
Data extraction is a reverse procedure of data embedding. With the secret key, the receiver first extracts all overlapping patches from the stego image. Then they extract each kernel from each patch to recover the source pattern. Subsequently, the overlapping patches and candidate patches can be generated from the source pattern again. By calculating the MSE values and ranking them, the recipient can find easily the ranks of the same patch between stego patch and candidate patch so that the secret bits can be extracted exactly.
Since Wu's scheme used the mirroring technique to extend the boundary patch of the source pattern, Zhou et al. [Zhou, Chen, Zhang et al. (2017)] searched patches in the stego images to recover the source pattern by comparing the similarity of the mirroring part. Using the same way of Wu's method, they can successfully extract the hidden messages.
Furthermore, in order to prevent the attack of Zhou's scheme, Du et al. used Quasi-Affine transformation on limited integer to generate redundant location, which are pasted by randomly selecting some candidate patches. Accordingly, even if the attacker successfully recover the source pattern, they cannot extract the secret message correctly because they do not know exactly which patches hide the secret messages.
In order to improve the security and visual quality, Qian et al. [Qian, Huang, Li et al. (2018)] designed a new method to generate boundary region. In addition, they extend the source pattern to generate more candidate patches, which are used to synthesis the steganography pattern, resulting in an improvement of visual quality of stego image.
Although the above mentioned schemes can achieve the covert communication of secret information by constructing the texture stego image, there still has an obvious improvement room, e.g., visual quality, key security, and anti-steganalysis capability. This work is to fill this gap.
3 Steganography based on compression mapping of secret messages 3.1 The framework of proposed scheme The framework of proposed scheme contains two parts: message preprocessing and texture image extension. In the message preprocessing stage, we divide the original message into multiple bit blocks. The decimal value transferred by each bit block is further compressed by mapping them to different interval, which are denoted by different block sign characters. In texture image extension stage, given a small source pattern, we firstly construct the candidate pattern by combining source pattern and block matching algorithm. Then, source pattern is extended and is randomly hashes on some locations in a blank canvas (original stego pattern). Subsequently, we divide the candidate pattern into multiple overlapping patches and distribute them into the remaining locations of stego pattern by a key. Finally, the compressed messages are referred to select the candidate patches that equals to the same decimal number of mean square error, which are filled in the remaining blocks in stego pattern until the stego pattern is synthesized completely. Since the sign characters mapping the compressed messages are fully recorded, the original messages can be perfectly restored. The overall framework is shown in Fig. 1.

Compression mapping of secret messages
In this section, we first process the original messages. Assume that M is the bit length of original messages, we segment the original messages into N bit blocks.
where BP is the number of bits embedded in each patch and can be transferred to a decimal interval [0, BP d ], where BP d is the maximum decimal value that BP bits can represent. Notably, BP is not related to the patch size, but to the total amount of secret messages.
With the same number of patches, the larger amount of secret messages, the more bits each patch needs to carry. Accordingly, if more secret messages need to be delivered, we can set a bigger BP for each patch.
We further divide the interval [0, For any secret bit block, we can transfer it to a decimal value and map it into one of the above four sub-intervals.
where T′ represents the compressed secret messages. Since the compressed messages must be recovered correctly when they are extracted, the receiver needs to know which subinterval secret bit block is mapped. Thus, we use two bits as "sign character" to record the sub-interval that one bit block is mapped.
where l stands for the actual sign character for each bit block.
We can use a simple example to explain this procedure. Given a secret bit block "111011001011", its decimal value can be represented as "3787". We can use Eq.
Notably, since the sign character can uniquely pin to the sub-interval that one bit block is mapped, it can thus guarantee that the secret messages are recovered accurately.

Texture extension
In this section, we show the procedure of candidate pattern construction. Given the source pattern P with size S w ×S h , we segment the source texture image into a number of nonoverlapped kernel blocks, which have the same size K w ×K h , e.g., Fig. 2 We use the window with size P w ×P h to scan source pattern P (referring to Fig. 3). Multiple candidate patches are obtained and their total number can be calculated as follows.
We further put source pattern P on the center position of a blank canvas to construct pattern E, whose size is Obviously, there is a boundary sized P d between pattern P and pattern E. In order to fill the blank between pattern P and blank canvas, we choose the most suitable candidate patch to synthesis pattern E. To be specific, we firstly calculates the mean square error (MSE for short) of the overlapped region between synthesized patch and each candidate patch. Since the total number of candidate patches are CP n , there are thus CP n MSE values.
where OL i stands for pixels of overlapped region p j c indicates the pixel of candidate patch, and p s j is the pixel of synthesis region. Then, we sort the CP n MSE values in ascending order and select the candidate patch with the first rank as synthesized patch. This procedure can guarantee that the MSE between the selected candidate patch and the region that need to be filled is minimum. That is also to say, the most similar candidate blocks can ensure the synthesis steganographic image has the highest visual quality. Finally, the selected candidate patches are pasted on the blank region one by one to generate pattern E, which is used to synthesis stego pattern S and candidate pattern C. The complete procedure can be found in Fig. 4.

Affine transformation and sign character
With extended pattern E, we further divide it into SP n overlapping patches by using the same raster scanning in Fig. 5. Each overlapping patch is P w ×P h .
where E w =(S w +2P d ) and E h =(S h +2P d ) are the width and height of pattern E, respectively. Thus, Given another blank canvas S with size S′ w ×S′ h , we use the same method as pattern E to split S into blocks with the same size.
Subsequently, SP n overlapping patches are randomly distributed into the blank canvas S by a secret key 1. Since S has a bigger size than pattern E, the block number of remaining blank region in S is SP′ n -SP n . Furthermore, the affine translation with another secret key 2 (a, b, c, d, e, f) is used to randomly map some locations by Eq. (9) (Corresponding to the red patches in Fig. 6). These selected locations are used to embed the sign characters from secret messages, which have been explained in Section 3.2.
Denote the number of selected patches as TP n , the final number of remaining blank patches can be then calculated as follows.

Figure 5:
With the extended pattern E, we could get overlapping patches which have the same number compare to kernels divided by source pattern P EP n ¼SP 0 n ÀSP n ÀTP n (10) 3.5 Data embedding and data extracting In the above three subsections, we have generated extended pattern E and pattern S, where pattern S contains some candidate patches that are used to hide the sign characters of secret messages (Corresponding to the red patches in Fig. 6). In this section, we further explain the procedure of data embedding and extraction.

Data embedding
We first process secret messages as two parts: compressed messages and their sign characters. According to Section 3.2, the number of compressed messages is N, the sign characters are thus 2N. We describe the embedding procedure as follows.
Step 1: We extend the pattern E to another bigger candidate pattern with size C w ×C h , which is denoted as C. The actual processing is as follows. Divide E into multiple overlapping patches (referring to Fig. 3) and randomly distribute them into pattern C by a key 3. The remaining blocks can be filled with the candidate blocks, which are generated from pattern P by raster scanning (referring to Fig. 3). The size of pattern C is naturally bigger than pattern E.
Step 2: The pattern C is further divided into multiple candidate patches by raster scanning (referring to Fig. 3), which are used to synthesis pattern S by combining compressed messages and their sign characters. Denote the number of candidate patches as CP′ n , Then, denote that TP n is the number of candidate patches that are used to hide the sign characters in S.

Figure 6:
The locations selected by affine transformation. Red blocks represent the secret locations which are used to hide the sign character, while blue blocks are the candidate patches segmented by extended pattern E where L¼ log 2 CP 0 n b cis the length of sign characters that each candidate patch can embed the maximum bit number.
Step 3: Following the raster scanning order, sort the CP′ n candidate patches from pattern C and denote their serial number as c 1 ; c 2 ; . . . ; c CP 0 n . Then, transfer L bits sign characters to a decimal value T L . If T L =c i , 1≤i≤CP′ n , the corresponding c i -th candidate patch in pattern C is selected to fill the red synthesized patch in S.
Step 4: According to the Eq. (10), the remaining EP n synthesized patches in S can be use to embed the compressed messages, which contain N decimal values fT 0 1 ; T 0 2 ; . . . ; T 0 N g that are calculated by Eq. (2). For any synthesized patch, we replace it by using each candidate patches from pattern C, respectively, and then obtain CP′ n MSE values. Sort CP′ n MSE values with ascending order and denote their serial number as fs 1 ; s 2 ; . . . ; s CP 0 n g. If T′ k =s i , 1≤k≤N and 1≤i≤CP′ n , the corresponding s i -th candidate patch in pattern C is selected as synthesized patch, which is used to carry the compressed message T′ k .
Step 5: Repeat the Step 4 until the pattern S is completely synthesized as stego image.
Notably, in these above steps, if N<EP n , we fill the remaining EP n -N synthesized patches by using the s 1 -th candidate patch in pattern C each time, otherwise, we can solve this problem easily by extending the size of pattern S.

Data extracting
When the stego image S is obtained, the complete messages can be easily extracted by the following steps.
Step 1: According to the key 1, the positions of overlapping patches from source P in stego image S can be located exactly. Then, the source P can be recovered completely. With the source P, pattern C is also extended based on the procedure in Section 3.3.
Step 2: Furthermore, we use the key 2 and affine transformation to locate the synthesized patches that embed the sign characters of compressed messages. The sign characters can be extracted by combining the pattern C.
Step 3: The compressed messages fT 0 1 ; T 0 2 ; . . . ; T 0 N g are also sequentially extracted by calculating and sorting the MSE values. Finally, the original messages can be recovered correctly by combining the compressed messages and their sign characters.

Experimental setup
We test the proposed scheme by a series of experiments that are carried out with Brodatz Textures. Four kinds of texture source pattern with different texture distribution are shown in Fig. 7. In our experiments, we set the size of source pattern P, pattern C and the stego pattern S as 128×128, 191×191, and 528×528, respectively. The corresponding experiments are implemented over a computer with an Intel(R) Core(TM) i5-8250U CPU @ 1.60 GHz 1.80 GHz and 8 GB RAM.

Visual quality test for different texture image
In this experiment, we test the visual quality of synthesized stego images using our proposed scheme. For illustration purpose, we evaluate the visual quality of stego image by calculating the average MSE values (AMSE for short).
where OL i represents the pixels of overlapping regions. Generally speaking, the smaller AMSE value indicates the better visual quality of synthesized stego image. In addition, we consistently use the bits of per patch (BP for short) to measure the embedding capacity for different steganographic schemes, which can be calculated by Eq. (1).
We compare proposed scheme with Wu's scheme [Wu and Wang (2014)] and Qian's scheme [Qian, Huang, Li et al. (2018)] by simulating four different textural sources. Accordingly, the synthesized stego images generated by above four kinds of texture sources have different visual quality. To give an overall insight, the experiments are repeated 10 times, and the average results are shown in Fig. 8. As can be seen from this figure, whatever textural sources are used, our scheme always have an obvious lower AMSE values with the same embedding capacity. This demonstrates that proposed scheme can obtain significant better visual quality than that of other two schemes. This phenomenon can be explained easily. Proposed scheme employs compression mapping processing to map messages to a smaller decimal sub-interval (referring to Eq. (2)). This makes that the candidate patches with the minimal MSE value in pattern C are easier to be selected as Figure 7: Four kinds of texture source patterns are used in our experiments. For different source pattern, the first picture is the source texture P, the second is the extended pattern E, the third is candidate pattern C, and the last pattern is synthesized pattern S the synthesized patch of S, resulting in a better visual quality for stego image. The actual experimental results with BP=12 can be found intuitively in Tab. 1.
In addition, we can observe an interesting phenomenon, that is, when BP is obvious small, proposed scheme presents an insignificant advantage comparing with other two schemes.  This is mainly because less secret messages implies that the pattern C is divided into less candidate patches, which results in the effect of compression mapping cannot be fully reflected, because the top ranked candidate patches are always selected when mapping compressed messages.

Comparison of embedding capacity
In this section, we compare the embedding capacity of our proposed scheme with other two steganographic schemes.
We first test the maximum embedding capacity BP max when setting textural sources with different size, T w ×T h =1024×1024, and 1008×1008. The corresponding results are shown in Tabs. 2 and 3. From these two tables, we can observe that although proposed scheme improves the maximum embedding capacity comparing with Wu's scheme, i.e., the gain is approximately 2%, it has a clear gap between proposed scheme and Qian's scheme, approximately 14%. This is mainly because proposed scheme employs some synthesized patches in pattern S to hide the sign characters. This makes that the synthesized patches in S that can be used to carry the secret messages are relatively less than that of Qian's scheme. Nevertheless, we would like to stress that proposed scheme still has a superior performance under the same embedding capacity. Actually, this conclusion can be also verified by Fig. 8. In addition, Fig. 9 shows the embedding capacity under the same AMSE for different texture images. We can see that with the same AMSE, our proposed scheme has a higher embedding capacity than that of other schemes. Moreover, we also observe that Fig. 9d has a significant bigger AMSE value. This demonstrates that the more complex the image texture, the worse the visual quality of synthesized stego image.

Security analysis for key
In our proposed scheme, three keys, Key 1, Key 2, Key 3, are used to improve the algorithm security, where Key 1 is used to randomly distribute the overlapping patches from extended pattern E into stego pattern S, Key 2 is used to implement affine transformation, while the Key 3 is used to control the extension procedure from pattern E to candidate pattern C. For Wu's scheme, since it only uses the Key 1 to randomly distribute the overlapping patches, an  In this experiment, the parameters are set to T w ×T h =1008×1008, P w ×P h =48×48 and P d =8. (d) Figure 9: Relationship between visual quality and embedding capacity for different texture image. The ordinate stands for the number of bits in each patch, while the abscissa represents the average MSE attacker can obtain easily source pattern from stego pattern and then recover the secret message once he gets this key. This conclusion has been validated by Zhou et al. [Zhou, Chen, Zhang et al. (2017)].
Additionally, comparing with Qian's scheme, proposed scheme employs another key to implement affine transformation, which can select some positions in synthesized stego pattern S to hide the sign characters produced by secret messages. Although these positions consume some embedding capacity comparing with Qian's scheme, it improves exactly security performance of algorithm, because even if an attacker obtains the Keys 1 and 3, he cannot distinguish which blocks are embedded with secret messages. Tab. 4 shows the qualitative analysis of key security for different steganographic schemes.

Test for anti-steganalysis performance
In this section, to evaluate anti-steganalysis capability, we use the classical quantitative steganalysis method, RS analysis, to give testing results. For RS analysis, the relative number of regular groups for mask M=     [Efros and Freeman (2001)] has been used to eliminate the pixel mismatch as much as possible, the slight mismatching still exist during the synthesis process, resulting in slight modifications for stego images.

Test for time complexity
To give a more insight, we test the time complexity of proposed scheme over different textural images. The corresponding experimental results have been shown in Tab. 6. From this table, we can observe that Wu's scheme has the lowest time complexity. This is because Wu's scheme directly selects the candidate patch that equals to the decimal value of BP secret bits, leading to low time complexity, but, an inferior visual quality. In contrast, our scheme and Qian's scheme construct a bigger candidate pattern to generate more candidate patches. More candidate patches imply that when the steganographic image is constructed, the optimal synthesis patch has a larger selection range. Accordingly, the generated stego image has a higher visual quality, but, higher time complexity.

Conclusions and future work
Constructive texture steganography has a much needed in the presence of data hiding, because the stego image can be constructed by synthesizing the image block directly, not modifying the pixels. This important requirement, however, is largely ignored in existing traditional steganography. We further improved the application by developing a new method, which designs the compression mapping method over secret messages. Our scheme can extract original secret messages accurately while keeping higher visual quality for stego images. The proposed scheme, verified with comprehensive evaluation, has high embedding capacity, security performance and good anti-steganalysis capability.
In the future, we plan to extend the work in two directions. First, we will investigate good mapping methods to further compress the original secret messages while keeping high visual quality. Second, we plan to extend our work to compressed image formats.
Funding Statement: This work was supported by Natural Science Foundation of China under Grants (U1736120, 61602295).

Conflicts of Interest:
The authors declare that they have no conflicts of interest to report regarding the present study.