## 3 The Proposed Local-Moment-Driven Robust Reversible Data-Hiding Scheme
### Embedding Method
#### 3.1.4 Embedding Algorithm
For this, two prediction errors (\(e_{1}^{PEE}\) and \(e_{2}^{PEE}\)) are calculated, such as \(e_{1}^{PEE}=x_{1}-\left[\mu_{1}\right]\) and \(e_{2}^{PEE}=x_{2}-\left[\mu_{2}\right]\), where \(\left[.\right]\) gives a rounded-off value and the \(\mu_{1}\) and \(\mu_{2}\) represents the local moment of pixels \(x_{1}\) and \(x_{2}\), respectively. Thus, the calculated values of \(\left[\mu_{1}\right]\) and \(\left[\mu_{2}\right]\) are 18 and 18, respectively. Therefore, \(e_{1}^{PEE}=0\) and \(e_{2}^{PEE}=1\) are obtained. Next, the errors are modified based on secret bits using Figure 2b. From Figure 2b, it is clear that the error pair (\(0\), \(1\)) can be expanded to either (\(0\), \(2\)) or (\(1\), \(2\)) based on the secret data bit value. Since the bit is '0', the pair is expanded to (\(0\), \(2\)), which in turn modifies the pixels to 18 and 20. In this way, embedding is carried out in the \(F_{G}\). For embedding in the \(S_{G}=(18,\ 18,\ 18)\), the count of pixels in the group is checked, as it is 3, which means the embedding will be carried out using the EP-IPVO scheme. For this, two prediction errors (\(e_{1}^{IPVO}\) and \(e_{2}^{IPVO}\)) are calculated, such as \(e_{1}^{IPVO}=x_{s}-x_{t}\) and \(e_{2}^{IPVO}=x_{u}-x_{v}\), where the value of \(x_{s}\), \(x_{t}\), \(x_{u}\), and \(x_{v}\) are 18, 18, 18, and 18, respectively. Therefore, \(e_{1}^{IPVO}=0\) and \(e_{2}^{IPVO}=0\) are obtained. Next, the errors are modified based on secret bits using Figure 2a. From Figure 2a, it is clear that the error pair (\(0\), \(0\)) can be expanded to either (\(0\), \(0\)), (\(-1\), \(0\)) or (\(0\), \(-1\)) based on the secret data bits value. Since the bits are is '01', the pair is expanded to (\(-1\), \(0\)) which in turn modifies the pixels to 17, 18, and 18. In this way, the embedding is carried out in the \(S_{G}\) and the partial stego-image is obtained. In the next phase, the embedding in the white background pixels of the group can be performed in a similar manner. To avoid repetition of explanation, the same has not been repeated. by just reversing the arrow direction. Next, the minimum and the maximum pixels of the group are recovered using the following Equations (23) and (24), respectively:  
\[x_{\pi(1)}=x_{\pi(2)}-\left|e_{1}^{IPVO}\right| \tag{23}\]  
\[x_{\pi(N)}=x_{\pi(N-1)}+\left|e_{2}^{IPVO}\right| \tag{24}\]  
In case the cardinality(\(\#\)) is equal to 2, two errors (\(e_{1}^{\prime PEE}\) and \(e_{2}^{\prime PEE}\)) are calculated using Equations (16) and (17), respectively. Next, the hidden information is extracted by receiving the contracted error pairs (\(e_{1}^{PEE}\) and \(e_{2}^{\prime PEE}\)) after following Figure 2b by just reversing the arrow direction. Next, the recovered pixels (\(x_{1}\), \(x_{2}\)) of the group are obtained using the following Equations (25) and (26), respectively:  
\[x_{1}=[\mu_{1}]+e_{1}^{PEE} \tag{25}\]  
\[x_{2}=[\mu_{2}]+e_{2}^{PEE} \tag{26}\]  
Otherwise, if cardinality(\(\#\)) is equal to 1, that means the S-PEE rules of Table 1 are used for extracting the hidden information bit ( \(b_{1}\)) and recovering the pixel value. After processing the \(y-set\) pixels, \(x-set\) pixels of \(I^{\prime MSB}\) are processed to get back the hidden information and recover them. This process is followed in a block-wise manner until all the hidden information is not extracted. Next, the compressed location map (\(CLM\)) is separated from the extracted hidden information and decompressed. The decompressed location map is then used to post-process the pixels of the image to reach their original values using Equation (27):  
\[P_{l}=\left\{ \begin{array}{l l l l l}P_{l}-1&\quad\quad if\ P_{l}=0\ \ and\ LM(l)=1,\\ P_{l}+1&\quad if\ P_{l}=MAX\ \ and\ LM(l)=1.\end{array} \right. \tag{27}\]  
where \(l\) is the number of the pixel scanned in the raster-scan order of the image \(I^{MSB}\). At the end, the resultant images \(I^{MSB}\) and \(I^{LSB}\) are composed to re-obtain the original cover image (\(I\)).