A Multilayer Steganographic Method Using Improved Exploiting Modification Directions Scheme

The exploiting modification direction scheme is a well-known irreversible steganographic method because of its high embedding efficiency and imperceptibility. The shortcomings of the exploiting modification direction scheme are the use of a (2n + 1)-ary notational system secret digit and low payload. Some studies transform secret data into a sequence of secret digits in the 8-ary notational system to overcome the disadvantage of using a non-binary secret data problem, which also increases the payload. Additionally, some studies have proposed a two-layer embedding method to enhance data security, which also increases the payload. Besides, most of the EMD-based scheme has the fall of boundary problems when the pixel group is located in the boundary area, which increase the distortion of the stego-image. In this study, we proposed a multilayer steganographic method using an improved exploiting modification direction scheme, which includes the abovementioned advantages, using binary secret data, increasing the payload, enhance data security and preventing the fall of boundary problem. In addition, we demostrate a three-layer EMD-based data hiding example. The experimental results show that the proposed method achieves a high payload (approximately 4.5 bpp) and the quality of the stego-image satisfying the human vision system sensitivity (PSNR value is greater than 30 dB).


I. INTRODUCTION
The popularity of computers and the fascinating development of the Internet have made digital data widely used in the contemporary world. It is convenient to share large amounts of multimedia data through ubiquitous channels. However, this has also caused consumers to worry about security and privacy issues. Digital steganography is a technology in which the sender conceals secret data in the cover media (e.g., text, sound, images, videos) imperceptibly to obtain the stego-media. After being transmitted to the communication channel, secret data with a specific algorithm can be extracted accurately and completely. Owing to its imperceptible characteristics, stegomedia can defend against aggressive and rude attackers during transmission, which, in some ways, makes differences from cryptographic encryption, another communication security technology. In this study, grayscale images were used as cover media.
Digital steganography can be divided into two categories: reversible and irreversible. The two types of digital steganography methods are shown in Fig. 1. Reversible steganographic technology can restore the cover image after the recipient extracts the secret data from the stego-image, while irreversible steganographic technology cannot. The most commonly used steganographic schemes include the histogram shifting (HS) scheme, the difference expansion (DE) scheme, modification of prediction errors (MPE) scheme, and pixelvalue-ordering (PVO) scheme. On the other hand, for the irreversible part, the least significant bit substitution (LSB) scheme, pixel-value differencing (PVD) scheme, and exploiting modification direction (EMD) scheme are common. Recently, dual-image reversible data hiding (DRDH) has been an active research area and attract attention because of its unique advantages in security, embedding capacity and visual quality [1][2][3][4][5][6]. Chang, Kieu, and Chou first proposed the DRDH scheme [1,2]. A location-based DRDH is proposed by Lee et al. [3]. Lee and Huang [4] proposed a orienttion combinations DRDH. Biswapati, Debasis and Kumar [5][6] proposed the DRDH by combine the PVD and EMD methods and using pixel value differencing expansion.
The embedding capacity and the quality of the stego-image are the primary indicators of steganographic technology performance. However, many researchers have focused on irreversible steganographic techniques owing to their high payload and simple implementation. In this study, we focus on irreversible steganographic technologies.
The LSB scheme is widely used and was first proposed by Bender et al. [1]. It directly substitutes n secret bits and makes them embedded into n LSBs of each pixel in the cover image, providing a high payload and obtaining a good visual quality stego-image. To improve visual quality, two critical strategies are required for the LSB scheme. One is the optimal adjustment process (OPAP) proposed by Chan and Cheng [2], and the other is the modulus function proposed by Thien and Lin [3]. OPAP was proposed to enhance the image quality of the stegoimage obtained using the simple LSB substitution method. The modulus function achieves good image vision quality without the need for post-processing. To overcome the asymmetry of the LSB scheme, Li et al. [4] proposed an LSB matching (LSBM) scheme. It reduces the asymmetric effects by randomly adding ± 1 to each pixel of the cover image, but this addition depends on the secret bits and pixels of the cover image. The LSB matching revised (LSBMR) scheme, proposed by Mielikinen [5], was used to raise the stego-image quality. A binary function and four hiding rules were used to embed secret bits inside two consecutive cover pixels, and the value of one cover pixel at most will vary by one. Note that the LSBMR scheme embeds the same payload as the LSBM scheme but has fewer distortions. Sahu and Swain [6] proposed a high fidelity reversible data hiding scheme using modified LSBM and pixel difference. However, the LSB-based scheme can be simply detected using statistical analysis techniques, such as RSsteganalysis [7].
Based on human vision system sensitivity, Wu and Tsai [8] proposed the PVD method to conceal the secret data. The values of two consecutive cover pixels are calculated and replaced with a new difference value based on the sum of the lower bound of an interval range and the secret data. Because human eyes are more sensitive to changes in pixels in smooth areas than in edge areas, the PVD method can be embedded more secret data in smooth areas than in edge areas. A stagnographic method called side matching was proposed by Chang and Tseng [9]. The side information of neighboring pixels is used to estimate the embedding capacity for reaching the target pixel. Additionally, to enhance the capacity and imperceptibility, Tseng et al. [10] took advantage of the PVDbased methodology. Swain [11] proposed an adaptive PVDbased approach that considers vertical and horizontal pixel pairs. Two steganographic schemes were proposed by Hussain et al. [12]. One is based on the parity-bit pixel value difference (PBPVD), and the other improves the rightmost digit replacement (iRMDR) technique. The latter pays the cost of low stego-image quality to reach a high capacity. However, both cases in the cover image are chosen sequentially to hide the secret message. However, the PVD-based scheme has two problems: (1) The error block problem and (2) The fall of boundary problem. Besides, the PVD-based scheme can be detected by the pixel difference histogram (PDH) analysis.
Sahu and Swain [13] using adaptive LSB and PVD technique resisting PDH and RS analysis. Sahu etc. [14] using multi-directional block based PVD and modulus function resisting PDH and RS-steganalysis. Sahu and Swain [15] proposed an optimal information hiding approach based on PVD method and modulus function. Various start-of-the-art digital image steganography and steganalysis is introduced in [16].
To increase the payload, many researchers [18][19][20][21][22][23][24] used two pixels as a group and defined different extraction functions for the embedding and extraction procedures. Chang et al. [18] showed that the embedding rate is bounded by (log25)/2. Additionally, using a two-stage embedding technology to embed n pixels twice at a time, an improved EMD-hiding method increases the payload by 2.32 bpp. Chao et al. [19] defined a brand-new extraction function: f (x1, x2) = ((2k +1)  x1 + x2) mod N (where N is the range of component of neighboring vectors of (x1, x2)), which can embed secret digits in (2k 2 + 2k + 1)-ary notational system, and the payload increased up to 2.68 bpp when k = 4. Chen et al. [20] proposed a flexible EMD-based technique that considers the overflow problem. To address this issue, the danger pixel components that may result in overflow problems are identified and moved to a safe area. Then, the EMD scheme is used for the embedding and extraction processes to improve the stegoimage quality. Kim et al. [21] proposed 2-EMD and EMD-2 schemes based on (2 n+x -1)-ary notational system secret digits to increase the payload and achieve maximum payload log210 or 3.22 bpp. Furthermore, Kieu and Chang [22] used eight directions to improve the EMD scheme, which is called the fully exploiting modification direction (FEMD) scheme. The extraction function is defined as f (x1, x2) = ((s-1)  x1 + s  x2) mod s 2 , where s is an integer and s ≥ 2. It achieves a higher payload (up to 4.5 bpp when the parameter s =23), and the quality of the stego-image is acceptable (approximately 31 dB). Leng and Tseng [23] used an n-pixels-group in a grayscale cover image as a group that is based on an n-dimensional hypercube to increase the payload and achieve a maximum payload 4.75 bpp. The disadvantage of the abovementioned methods is the use of non-binary notational system secret digits.
To overcome this shortcoming, Leng et al. [24] proposed a high-payload EMD-based steganographic scheme based on a binary notational system secret digit. The embedding and extraction procedure combines the mapping matrix, which is generated by two extraction functions. With the diversity of the definitions of these two extraction functions, the proposed method achieves a higher payload of up to 4 bpp, and the quality of the stego-image satisfies human vision system sensitivity. The abovementioned methods use the extraction function in the embedding and extraction procedures. According to the function, the corresponding mapping matrix is constructed using an extraction-function-based EMD method. A comparison of the EMD method [18][19][20][21][22][23][24] based on extraction function-based methods is shown in Table 1.
Another shortcoming of the EMD scheme is that the secret data must be converted into a non-binary notational system. To solve this problem, Lee et al. [25] proposed an improved exploiting modification direction (IEMD) scheme, which defines an extraction function f (x1, x2) = (x1 + 3x2) mod 2 3 to embed three binary secret bits simultaneously. Its payload is 1.5 bpp and achieves high stego-image quality (PSNR value of approximately 50 dB). Although the IEMD technique is represented as a mapping matrix similar to the reference matrix, it essentially uses the extraction function to embed the secret data. Chang et al. [26] presented a Sudoku-based data hiding scheme to improve security, in which a secret digit in 9-ary notational system is embedded in each pair of pixels; however, their scheme has a large search set and can only embed a 9-ary notational system, which is inflexible to multiple embedded requirements. Chang et al. [27] proposed a novel turtle shell-based scheme for data hiding. They used a reference matrix based on hexagon-shaped turtle shells instead of the extraction function of the EMD scheme in the embedding and extraction procedure. Each turtle shell has 8 distinct digits (from 0 to 7), which means that three binary secret bits can be embedded simultaneously, with a payload of 1.5 bpp. Liu et al. [28] also conducted research on high-capacity turtle shell-based data hiding by adding an extra location table to increase the payload (2 bpp). Kurup et al. [29] proposed a reference matrix-based data hiding scheme based on octagon-shaped shells to achieve a higher payload (2 bpp). It enlarges the reference matrix from hexagon to octagon, each octagon-shaped shell has 16 distinct digits (from 0 to 15) and can embed four binary secret bits simultaneously. Leng [30] improved Kurup et al.'s scheme by using regular octagon-shaped shells to achieve a higher payload (2.5 bpp) and stego-image quality in 2017.
Furthermore, Leng and Tseng [31] extended the scheme of Leng [30] to search for all possible solutions to maximize the payload of the octagon-shaped shell reference matrix. It achieves 3.5 bpp payloads, and the stego-image quality is suitable (approximately 30.60 dB). In 2019, Leng [32] generalized a data hiding scheme based on octagon-shaped shells. The octagon-shaped shell reference matrix is built using four parameters: m, n, k, and w, where m and n are the width and height of the reference matrix, k is the width and height of the corner of the octagon shell, and w is the number of secret bits to embed. However, at (m, n, and k) = (14, 20, and 3), a high payload (4 bpp) with good visual quality (34.70 dB) was achieved. The comparison among the methods [25][26][27][28][29][30][31][32] based on the reference matrix-based method is shown in Table 2. To enhance security, a two-layer EMD scheme was proposed by [33][34][35][36]. Xie et al. [33] proposed a two-layer turtle shell matrix method to achieve 2.5 bpp payloads. Wang et al. [34] proposed an improved method that embeds secret bits in the two-dimensional space of the reference matrix twice and implied two 5-ary digits at a time. Under a two-layer magic matrix, Shen et al. [35] proposed a method that can embed secret bits in various notational systems by combining many signet sizes and achieving 3.5 bpp payloads. Lee et al. [36] proposed a new scheme based on a two-layer octagon-shaped shell matrix in which each cover pixel pair can carry 7-bit substreams of secret data and achieve an embedding capacity of 3.5 bpp. These schemes [33][34][35][36] based on the two-layer EMD scheme are described in detail in Section 2. The above methods use the reference matrix instead of the extraction function in the embedding and extraction procedures. Reference matrixbased schemes provide a balance between the payload and stego-image quality. The comparison among the methods [33][34][35][36] based on the two-layer reference matrix-based method is shown in Table 3.   TABLE 3. Comparison among the two-layer's reference matrix-based method.

Method
Notational system Payload Xie et al. [33] binary 2.5 bpp Wang et al. [34] 5-ary 2.32 bpp Shen et al. [35] binary 3.5 bpp Lee et al. [36] binary 3.5 bpp In this study, we propose a multilayer steganographic method using an improved exploiting modification direction scheme, which includes the abovementioned advantages, using binary secret data, increasing the payload, and enhancing data security.
The remainder of this paper is organized as follows. Section 2 briefly reviews the introduction of Lee

II. RELATED WORKS
In this section, five schemes [25,[33][34][35][36] are described in detail. Lee et al. [25] showed the main idea of the proposed method, as well as how to reduce the distortion when the embedding procedure. The current two-layer embedding schemes are demonstrated in [33][34][35][36].

A. IEMD SCHEME
To achieve a high payload and solve the problem using nonbinary notational system secret data of the EMD method, Lee et al. [25] increased the notational system state from five to eight, which conforms to the binary notational system. In the embedding procedure, every pixel pair can embed three binary secret bits at a time. The extraction function f and embedding procedure are as follows: ( , ) = ( + 3 ) 8. (1) Step 1: The cover image C is divided into non-overlapping pixel pairs (pi, pi+1).
Step 2: Convert the binary secret bits B into one 8-ary secret digit s.
Step 5: Repeat Steps 3 and 4 to embed all secret digits and obtain the stego-image. The embedding process is complete.
In the extraction procedure, each stego pixel pair can extract three binary secret bits at a time. The extraction procedure is described as follows: Step 1: Divide stego-image I into non-overlapping pixel pairs (pi', pi+1').
Step 3: Convert the secret digit s into three secret bits B in binary notational system. Step 4: Repeat steps 2 and 3 to extract all the secret digits until the extraction process is complete.
For example, in Fig. 2, the cover pixel pair (pi, pi+1) is (5, 6), while the to-be-embedded secret bit is (110)2. First, the secret data are converted to secret bit s = (6)8 in the 8-ary notational system. Second, the extraction function, f (5, 6) = 7. According to step 3, we find that f (4, 6) = 6 satisfies the requirement. Hence, replacing the cover pixel pair (5, 6) with (4, 6), the stego pixel pair (pi', pi+1') is successfully obtained. On the receiver side, denotes the stego pixel pair (pi', pi+1') = (4, 6) by the extraction function f (4, 6) = (6)8, which is converted into a binary notational system as (110)2. Therefore, the confidential data were successfully extracted. The main advantage of the IEMD scheme is that the notational system is binary and the payload is 1.5 bpp, which is compared with the EMD method without loss of visual quality and security.

B. TWO-LAYER TURTLE SHELL MATRIX SCHEME
Xie et al. [33] constructed a turtle shell matrix with the extra attribute of a 4-ary digit, as shown in Fig. 3, which is the first two-layer scheme applied to the EMD scheme. The construction rules are as follows: first, the values of an element in a row change with the ascent or descent of the gradient, and the value is one, and the value of a column of elements changes with the ascent or descent of the gradient, and the variable values are two and three.
Furthermore, an additional attribute is assigned to each pixel pair m(x, y), called tm(x, y). The algorithm for calculating tm(x, y) can be described as follows: conduct an exclusive operation on all types of turtle shell involved. The algorithm categorizes all pixel pairs into one of the following four cases, as shown in Fig. 4. Case 1: No turtle shells were involved, such as m(0, 0). The type attribute of the specified element was set to 4, for example, tm(0, 0) = 4. Case 2: Only one turtle shell is involved, such as in m (2,3).
The type attribute of the specified element is set to the type of turtle shell, for example, tm(2, 3) = 1. Case 3: Two turtle shells were involved, such as m(2, 1). Then, the type attribute of a specified element is the result of the operation of binary representations of the two turtle shell types, for example, tm(2, 1) = 3. Case 4: Three turtle shells are involved, such as m (2,2). The type attribute of a specified element is the result of an operation of binary representations of the three turtle shell types, for example, tm(2, 2) = 2.
According to Fig. 4, m(x, y) in the turtle shell matrix M is assigned to a corresponding type attribute tm(x, y). In other words, a two-layer turtle shell matrix is constructed. The first layer is the matrix M = [m(x, y)]256256, and the second layer matrix is Tm = [tm(x, y)]256256. Fig. 5 shows a part of the two-layer turtle shell matrix.   In the embedding procedure, every pixel pair can embed five binary secret bits at a time. The embedding procedure is described as follows: Step 1: The cover image C is divided into non-overlapping pixel pairs (pi, pi+1). Consider (pi, pi+1) as the coordinates of matrix M to specify the value m(pi, pi+1) with the corresponding type attribute tm(pi, pi+1).
Step 2: Divide a secret binary stream B into five binary bit sub-streams b. For each sub-stream, the first two bits are converted into a 4-ary digit s1 and the last three bits are converted into an octal digit s2, viz., s = s1 || s2, where ''||'' denotes the string concatenation operator.
Step 4: Repeat Step 3 until all sub-streams are embedded.
In the extraction procedure, each stego pixel pair can extract five binary secret bits at a time. The extraction procedure is described as follows: Step 1: Divide stego-image I into non-overlapping pixel pairs (pi', pi+1').
Step 4: Finally, when all sub-streams b have been extracted, they are combined to form a secret binary stream B.

C. WANG ET AL.'s SCHEME
Wang et al. [34] proposed a new scheme for data hiding based on a reference matrix to achieve a greater payload. Compared with the published scheme, their research embedded two 5-ary secret digits in a two-layer reference matrix at a time. The reference matrix M = [m(x, y)]256256 was constructed using Eq.
(2) According to Eq. (3), for every pixel pair (pi, pi+1), we have an element M(pi, pi+1), which belongs to B(bx, by), and bx, by can be calculated using Eq. (3) as follows: Construct a sub-matrix B on the reference matrix M by extracting the center value of each 3 × 3 blocks, as shown in Fig. 7. This causes the value of one cover pixel to be increased or decreased by 1. In the embedding procedure, every pixel pair can embed two 5-ary secret bits at a time. The embedding procedure is described as follows: Step 1: The cover image C is divided into non-overlapping pixel pairs (pi, pi+1).
Step 2: Convert a secret binary stream B into a secret digit stream S in 5-ary notational system. Step 5: Based on the principle of the Euclidean distance, select the minimum distance.
Step 6: Repeat Step 3-6 until all secret digits are embedded.
In the extraction procedure, each stego pixel pair can extract two 5-ary secret digits at a time. The extraction procedure is described as follows: Step 1: Divide stego-image I into non-overlapping pixel pairs (pi', pi+1'). Step 4: Convert 5-ary sub-stream s into binary sub-stream b.
Step 5: Finally, when all sub-streams are extracted, they are combined into a secret binary stream B.
For example, in Fig. 6, the cover pixel pair (4,5) and the tobe-embedded bit stream (43) On the receiver side, the stego-image is divided into nonoverlapping pixel pairs, which can be extracted from two 5-ary secret digits. B(2, 3) contains the element M (5, 7). Then, the secret digits si = M(5, 7) = (4)5 and si+1 = B(2, 3) = (3)5. Finally, the embedded secret data (43)5 were extracted completely. Therefore, each pixel pair can extract two 5-ary secret digits using a two-layer reference matrix at a time. The disadvantage of this second two-layer scheme used in the EMD scheme is that it employs a 5-ary notational system.

D. TWO-LAYER MAGIC MATRIX SCHEME
Shen et al. [35] proposed a two-layer magic matrix by improving the magic matrix. The first-layer matrix M = [m(x, y)]256256 in grayscale images. The second-layer matrix T = [t(x, y)] contains (256/w1)  (256/h1) magic signets, which are shown as an example in Fig. 8(a), where magic signets are 64  64 and each signet is 4  4. For example, in the data embedding procedure, we take w1 = h1 = 4, w2 = h2 = 2 and assign t(x, y) to the type attribute in {0, 1, 2, 3}, for example, t(0, 0) = 2. Therefore, a two-layer magic matrix was constructed, as shown in Fig. 8(b). In the embedding procedure, every pixel pair can embed six binary secret bits at a time. The embedding procedure is described as follows: Step 1: The cover image C is divided into non-overlapping pixel pairs (pi, pi+1). Consider (pi, pi+1) as the coordinates of matrix M to specify the value m(pi, pi+1) with the corresponding type attribute tm(pi, pi+1).
Step 2: Divide a binary secret stream B into six binary bit substreams b. For each sub-stream, convert the first two bits into a 4-ary digit s1 and the last four bits into a 16ary digit s2, viz., s = s1 || s2, where ''||'' denotes the string concatenation operator.  m(pi, pi+1). Replace (pi, pi+1) with (pi', pi+1') in the cover image to embed the sub-stream s consisting of s1 and s2.
Step 4: Repeat Step 3 until all sub-streams are embedded.
In the extraction procedure, each stego pixel pair can extract six binary secret bits at a time. The extraction procedure is described as follows: Step 1: Divide stego-image I into non-overlapping pixel pairs (pi', pi+1').
Step 4: Finally, when all sub-streams b have been extracted, they are combined into a secret binary stream B.

E. TWO-LAYER OCTAGON-SHAPED SHELL MATRIX SCHEME
Lee et al. [36] proposed a two-layer octagon-shaped shell matrix in which each cover pixel pair can embed seven bits at a time. The first-layer matrix M = [m(x, y)]256256 based on the regular octagon-shaped shells was proposed by Leng and Tseng [31]. The second-layer octagon-shaped shell matrix T = [t(x, y)]5151 is shown in Fig. 9(a). For each element m(x, y) in the bottom layer of the reference matrix M, we assign tm(x, y) to the type attribute, which corresponds to each element m(x, y). Each type attribute tm(x, y) is categorized into three cases, as shown in Fig. 9(b).
Step 2: Divide a binary secret stream B into seven binary bit sub-streams b. For each sub-stream, convert the first two bits into a 4-ary digit s1 and the last five bits into a 32-ary digit s2, viz., s = s1 || s2, where ''||'' denotes the string concatenation operator. In the extraction procedure, each stego pixel pair can extract seven binary secret bits at a time. The extraction procedure is described as follows: Step 1: Divide stego-image I into non-overlapping pixel pairs (pi', pi+1').
Step 4: Finally, when all sub-streams b have been extracted, they are combined into a secret binary stream B.

III. THE PROPOSED METHOD
This study proposes a multilayer steganographic method based on the IEMD scheme [25], which includes the advantages of multilayer embedding, using binary secret data, high payload, and stego-image quality that satisfies the human vision system sensitivity (PSNR value greater than 30 dB). The proposed scheme can be divided into five phases: (1) multilayer reference matrix construction, (2) embedding, (3) data embedding, (4) extraction, and (5) data extraction. For convenience, the definition of symbols is showed in appendix. An example of a multilayer reference matrix is presented in Fig. 10.

A. MULTILAYER REFERENCE MATRIX CONSTRUCTION PROCEDURE
In this section, we construct a three-layer reference matrix for data hiding. First, we generated 256  256 sizes of the first-layer reference matrix M1 using Eq. (6) and divided it into 3 × 3 blocks, as shown in Fig. 11. The center of each 3  3 blocks (marked in dark color) is the second-layer reference matrix M2.
Second, for every pixel pair (pi, pi+1) in M1, we have an element M1(pi, pi+1), which belongs to M2 (c 1 x, c 1 y), and c 1 x, c 1 y calculated using Eq. (8), respectively: Then, we generated 85  85-size of second-layer reference matrix M2 and divided it into blocks of 3 × 3-size, as shown in Fig. 12. The center of each 3 × 3 blocks (marked in dark color) is the third-layer reference matrix M3. In other words, the second-layer reference matrix M2 is the center of each of the 3  3 blocks (marked in dark color) in Fig. 11.  Finally, for every pixel pair (pi, pi+1) in M1, we have an element M1(pi, pi+1), which belongs to M3(c 2 x, c 2 y), and c 2 x, c 2 y calculated using Eq. (8), respectively: Then, we generated 28  28-size of third-layer reference matrix M3, which is shown in Fig. 13. In other words, the third-layer reference matrix M3 is the center of each 9  9 blocks in Fig. 11 and the center of each 3  3 blocks (marked in dark color) in Fig. 12.
Furthermore, a three-layer reference matrix can be created, which can embed nine binary secret digits in most of the nonoverlapping pixel pairs.

B. THE EMBEDDING PROCEDURE
In this section, the data embedding procedure of the proposed method is presented. Fig. 15 shows a flowchart of the data embedding procedure. Assume that a secret binary stream B with length N is embedded in the cover image C with size W  H using the three-layer reference matrix. Initially, the cover image C is transferred into non-overlapping pixel pairs; the binary secret stream B is converted into 8-ary secret stream S. Then, three 8ary secret digits are embedded in each pixel pair using the constructed three-layer reference matrix. Because the third secret digit is embedded first, the embedding algorithm is classified into one of the two cases shown in Fig. 16. One is embedding three 8-ary secret digit success, and the other is embedding false. It depends on whether the third secret digit of the 8-ary secret stream S can be embedded. Finally, we obtained the stego-image after all pixel pairs are modified. Case 1: Embed success, for example, in Fig. 16(a), assumes that M3(c 2 x, c 2 y) = M3(1, 1), a part of the third-layer reference matrix is shown. Regardless of the third 8ary secret digit, we can find the corresponding value around M3(1, 1). In Fig. 16(b), we assume that M3(c 2 x, M3(0, 0), the third 8-ary secret digit in {1, 3, 4}, we can find the corresponding value around M3(0, 0), which means that the third secret digit can be embedded. Therefore, three 8-ary secret digits are embedded in the pixel pair success. Case 2: Embed false, for example, in Fig. 16(b), it is assumed that M3(c 2 x, c 2 y) = M3(0, 0), a part of the third-layer reference matrix is shown. When the third 8-ary secret digit in {2, 5, 6, 7}, we cannot find the corresponding value around M3(0, 0), which means that the third secret digit cannot be embedded. Therefore, in Fig. 17, the area marked with a dark color in M1 does not represent secret digits. After calculating M1(4, 4), using Eq. (11), that is, M3(0, 0) = M2(1, 1) = M1 (4,4), modifies the pixel pair to the closest area. In the embedding procedure, most of the pixel pairs can embed nine binary secret digits at a time. The embedding procedure is described as follows: Step 1: Generate a three-layer reference matrix (M1, M2, and M3), as shown in Figs. 10-13 in Section 3.1.
Step 3: Convert a binary secret stream B = b1b2…bN into an 8ary secret stream S. Three binary digits can be completely converted into one 8-ary digit.
= ( + 1) 3. Fig. 18 shows an example illustrating Eqs. (14) and (15), the area marked with a dark color represents not embedding secret digits. The d value of pixel pi shows the distance from the area marked dark color. When d = 1, it shows that pixel pi needs to be increased by two but decreasing by one has the same effect and reduces the distortion, for example, (3,4), di = 1 and di+1 = 2. Using Eq. (15), replace (3, 4) with (2, 5) as the stego pixel pair.
Step 6: Repeat Steps 4-5 until all pixel pairs are modified.
Finally, the stego-image I is obtained.

C. EXAMPLE OF DATA EMBEDDING PROCEDURE
For a better understanding, three cases of data embedding are presented in this section, and we take three layers as an example. The corresponding three-layer reference matrix is shown in Figs. 10-13, and the first case of data embedding is shown in Fig. 19.
For the third case, the only special circumstance that needs to be mentioned is that the third secret digit cannot be embedded. Fig. 21 illustrates the embedding procedure. The third original pixel pair and the to-be-embedded bit stream are (6,2) and (100, 000, 010)2, respectively. The bit stream (100, 000, 010)2 is first converted to three 8-ary digit streams (402)8 and calculates the center pixel pair M3(0, 0) of the 9  9 blocks using Eq. (8). To embed the third secret digit '2', it was difficult to find a satisfactory element by searching in a 3  3 square centered on M3(0, 0). Therefore, sign the pixel pair (6,2) to represent, which is not an embedded secret digit, as follows: Calculate the d value of the original pixel pair (6, 2) using Eq. (14), respectively, i.e., d1 = 1 and d2 = 0. Using Eq. (15), replace (6, 2) with (5, 2) as the stego pixel pair.

D. THE EXTRACTION PROCEDURE
In this section, the data extraction procedure of the proposed method is presented. Fig. 22 shows a flowchart of the data extraction procedure. According to the three-layer reference matrix, stego-image I with size W  H is an embedded secret digit. First, stego-image I is divided into non-overlapping stego pixel pairs. In the embedding procedure, most of the pixel pairs can extract nine binary secret digits at a time. The extraction procedure is described as follows: Step 1: Generate the three-layer reference matrix (M1, M2, and M3) using the shared construction information in the same way as described in Section 3.2.
Step 5: Convert the value of these three 8-ary secret digits into nine binary secret bits.
Step 6: Repeat Steps 3-5 until all stego pixel pairs are extracted. Combine them into the secret binary stream B.

IV. EXPERIMENTAL RESULTS
We used MATLAB R2018a software to execute the algorithm on WINDOWS 10 64-bit system equipped with an i5-4210 2.6 GHz CPU and 4 GB RAM. In this section, we used three 512  512 test images from the USC-SIPI image database, that is, Lena, Peppers, and Baboon. As shown in Fig. 25, three 512  512 RGB color images were converted into grayscale images before testing. A pseudo-random number generator was used to generate the required secret dataset. Based on the embedding capacity, PSNR, and security under RS-steganalysis, performance comparisons were evaluated. Furthermore, these experimental results were analyzed and shown in Sections 4.1, 4.2, and 4.3.

A. EMBEDDING CAPACITY AND VISUAL QUALITY ANALYSIS
This section analyzes the performance of the proposed visual quality and embedding capacity. The performance of the stegoimage was measured using the peak signal-to-noise ratio (PSNR). The PSNR, mean square error (MSE), and embedding capacity (EC) are defined as follows: In Eqs. (17)- (19), W and H are the length and width of the cover image, respectively; xij and xij' are the pixel values of the cover image and stego-image, respectively; NS represents the number of bits hidden in the secret data. Fig. 26 shows the stegoimages obtained using the proposed scheme. Obviously, the proposed scheme will not reduce the visual quality of the image, even though a large amount of secret data is embedded (up to 4.5 bpp). Table 4 shows a comparison between the proposed method and the other two-layer schemes [33][34][35][36] in Section 2.  Note that with the embedding capacity, the proposed scheme is significantly superior to the other two-layer schemes included in this experiment. More specifically, a higher embedding capacity (up to 4.5 bpp) and proper image quality decline are obtained, which shows a vivid difference from the methods in [33][34][35][36]. While other studies [33][34][35][36] obtained have higher average PSNR values of 47.11, 43.7, 36.87, and 36.92 dB, respectively, the embedding capacity of our proposed scheme is higher. The experimental results show that the proposed method in the three-layer reference matrix achieves a high payload (approximately 4.5 bpp) with good stego-image quality (PSNR value greater than 30 dB).
In order to evaluate the performance of the proposed method, we select 1000 RAW images from "ALASKA v2" database as the target images to repeat the experiment again. The embedding capacity and the stego-image quality is shown in Fig. 27. The embedding capacity is falling into the range between 3.7 bpp and 4.5 bpp. The average embedding capacity is 4.49 bpp. The stego-image quality is falling into the range between 30.4 db and 31.6 db. The average stego-image quality is 30.86 dB.
Clearly, the data of experimental results is very table. Because it only depends on the number of "embedding false" pixel group, which is located in the boundary area. Therefore, the proposed method can prevent the fall of boundary problem.

B. SECURITY AGAINST STATISTICAL RS-STEGANALYSIS
The human eye cannot judge what is conducted by steganalysis on the stego-image. As the quality of stego-images is more than 30 dB, it is difficult for human eyes to determine whether secrets are hidden in stego-images. Thus, an effective method is needed, such as the security of the proposed method against statistical RS-steganalysis [7], which efficiently detects hidden data inside the stego-image. The RS-steganalysis was used as a detection method in our study, proving good security under our proposed scheme. In RS-steganalysis, n adjacent pixels (x1, x2, …, xn) are selected as a pixel group. Then, the discrimination function, DF, defined by Eq. (20), is applied to quantify the smoothness or regularity of each pixel group.  (20) Fig. 27 shows the RS detection analysis of the Lena, Peppers, and Baboon images with the proposed method. Even with the addition of hidden data bits, stego-images have singular and regular parameters close to each other in the RS-analysis graphs. This shows that the proposed method has a high level of protection against statistical RS-analysis.

V. CONCLUSIONS
In this study, the proposed method is based on the concept of using a reference matrix in the embedding and extraction procedures. We proposed a multilayer reference matrix that can multi-layer embed binary secret bits, increase payload, enhence data security, and prevent the fall of boundary problem. In addition, we demostrate a three-layer EMD-based data hiding example. The payload and image quality depend on the number of layers in the reference matrix. In the three-multilayer reference matrix, most of the cover pixel pairs can embed nine binary secret bits in a time and lead to a high payload approximately 4.5 bpp. The quality of the stego-image satisfies the human vision system sensitivity (PSNR value greater than 30 dB). The characteristics of the media limit the number of embedding layers. For grayscale images, only three layers can be embedded; if applied to color images (RGB), the capacity can reach three times.
Cheng-Jung Tsai is currently a professor in the Graduate Institute of Statistics and Information Science at National Changhua University of Education, Chang-Hua, Taiwan, R.O.C. His research interests include data mining, big data analysis, information security, e-learning, and digital image processing.
Tien-Jung Wu received the M.S. degree in the Graduate Institute of Statistics and Information Science at National Changhua University of Education, Chang-Hua, Taiwan, R.O.C. His research interests are information hiding, big data analysis, and digital image processing.