# Enhanced Dual Reversible Data Hiding Using Combined Approaches
## 2 Preliminaries
### Arithmetic Coding
EMD employs a \((2n+1)\)-ary numeral system to embed secret information into \(n\) cover pixels, ensuring that, at most, one pixel is adjusted by \(\pm 1\). This approach enhances steganographic efficiency while minimizing distortion during embedding, thereby improving security. Compared to conventional methods, EMD offers higher embedding efficiency and enables the easy retrieval of embedded secret data. The core concept of this method is to group \(n\) pixels together and represent secret information through a specific combination of these pixels. In each group, one pixel at most is incremented or decremented by \(1\) to embed data, effectively minimizing image distortion. For instance, using two pixels, data can be embedded based on a quinary numeral system \((2n+1=5)\). First, the pixel group's value is calculated using the formula \(f(x_{1},x_{2})=(x_{1}\times 1+x_{2}\times 2)\mod 5\). If the computed value does not match the secret value to be embedded, one of the pixels is adjusted to achieve the desired result. This process ensures minimal changes to pixel values, enhancing both the security and recoverability of the embedded data. For example, if the pixel values are \([120,130]\), the calculation is \((120\times 1+130\times 2)\mod 5=380\mod 5=0\). If the intended secret value is \(1\), the first pixel value is increased by \(1\), adjusting the pixel group to \([121,130]\), thereby achieving the desired embedding result. ## 3 Proposed Method

In this paper, we propose a dual RDH method based on grayscale images (Figure 1). This method aims to achieve DH while considering efficiency and security aspects. To this end, copies \(I_{1}\) and \(I_{2}\) of the original image \(O\) are used as cover images. Given arbitrary-length binary data to be hidden, \(m=\{b\in\{0,1\}^{n}\}\), a block (\(H\times H\)) is then read from the two cover images and assigned to \(B_{i}^{1}\) and \(B_{i}^{2}\). From each block, one pixel is sequentially taken from both blocks to form a codeword \(P\), after which the HC is calculated to obtain the syndrome \(S\). The result of XORing this syndrome \(S\) with the binary data \(m\) is stored sequentially in \(M\). This process is applied to all pixels in the block, and then AC compression is performed to generate \(D_{comp}=\{b_{1},b_{2},\ldots,b_{k}\}\). The compressed binary bits \(D_{comp}\) are sequentially converted into quinary numbers, and the extended EMD method is applied to each pixel of the two blocks to hide the data. The dual RDH method proposed in this paper introduces an efficient data hiding scheme that ensures security, enhances data hiding performance, and maintains high image quality. ### Embedding Procedure

As preparation for DH, the original image \(O\) is used as the first cover image \(I_{1}\), and a copy of the original image is prepared as the second cover image \(I_{2}\). By applying our proposed DH method to these two cover images, two marked images are produced as the final result. The data embedding procedure involves encoding the secret data using Hamming code, arithmetic coding, and extended EMD. The embedding process is outlined as follows:

**Input**: Two cover images \(I_{1}\) and \(I_{2}\) and data bits \(m=\{b\in\{0,1\}^{n}\}\). **Output**: Two marked images \(I_{1}^{\prime}\) and \(I_{2}^{\prime}\). **Step 1**: Divide the grayscale images \(I_{1}\) and \(I_{2}\) into non-overlapping blocks of size \(16\times 16\). **Step 2**: Read corresponding blocks \(B_{i}^{1}\) and \(B_{i}^{2}\) from \(I_{1}\) and \(I_{2}\). The blocks \(B_{i}^{1}\) and \(B_{i}^{2}\) are composed of pixels \(\{x_{1}^{1},x_{2}^{1},\ldots,x_{16\times 16}^{1}\}\) and \(\{x_{1}^{2},x_{2}^{2},\ldots,x_{16\times 16}^{2}\}\). The total length of binary bits to be hidden in each block is \(16\times 16\times 3\). **Step 3**: Sequentially read pixels (\(x_{j}^{1}\) and \(x_{j}^{2}\)) from the two blocks \(B_{i}^{1}\) and \(B_{i}^{2}\) read from the cover image.