## 3 The Proposed Local-Moment-Driven Robust Reversible Data-Hiding Scheme
### Embedding Method
#### 3.1.2 Hiding Method Based on Adaptive Selection of Embedding Strategy  
It has been observed from the analysis of the literature that pixel-value-ordering-based methods provide high-fidelity images, while the prediction-error-expansion (PEE)-based pixel-wise or pairwise embedding methods provide a high embedding capacity with decent quality stego-images. Therefore, the proposed RRDH method selects an adaptively embedding strategy among the enhanced pairwise improved pixel value ordering (EP-IPVO), enhanced pairwise prediction error expansion (EP-PEE) scheme and Sachnev's prediction error expansion (S-PEE) based on the cardinality (\(\#\)) of the group (number of pixels in the group), so that the advantages of each of the methods can be exploited and optimal embedding is performed. More specifically, EP-IPVO is used to embed for cardinality (\(\#\)) \(>\) 2. In the case of cardinality (\(\#\)) being equal to 2, EP-PEE is used for embedding the secret message. The embedding is carried out using S-PEE when cardinality (\(\#\)) is equal to 1. For applying the EP-IPVO, the pixels (e.g., \(x_{1},\ldots\)\(x_{N}\)) of the group are arranged in ascending order (\(x_{\pi(1)},\ldots,x_{\pi(N)}\)), where \(x_{\pi(1)}\leq\ldots\leq x_{\pi(N)}\), \(\pi(i)<\pi(j)\) for \(x_{\pi(i)}=x_{\pi(j)}\) and \(i<j\). Next, two prediction errors are calculated using Equations (12) and (13), respectively. \[e_{1}^{IPVO}=x_{s}-x_{t} \tag{12}\]  
\[e_{2}^{IPVO}=x_{u}-x_{v} \tag{13}\]  
where \(s=min(\pi(1)\), \(\pi(2))\), \(t=max(\pi(1)\), \(\pi(2))\), \(u=min(\pi(N-1)\), \(\pi(N))\) and \(v=max(\pi(N-1)\), \(\pi(N))\)[11; 12]. Next, the minimum pixel (\(x_{\pi(1)}\)) and maximum pixel (\(x_{\pi(N)}\)) are modified by a maximum of \(-1\) and \(+1\) to embed the secret data in the group. More specifically, the modification of the pixel values are carried out based on the pair of error values (\(e_{1}^{IPVO}\) and \(e_{2}^{IPVO}\)) and embedding bits using Figure 2a. Figure 2a essentially represents the prediction error modification based on the embedding bits, which modifies the minimum and/or maximum pixels of the group as per Equations (14) and (15), respectively. \[x_{\pi(1)}^{\prime}=x_{\pi(2)}-\left|e_{1}^{\prime IPVO}\right| \tag{14}\]  
\[x_{\pi(N)}^{\prime}=x_{\pi(N-1)}+\left|e_{2}^{\prime IPVO}\right| \tag{15}\]Here, symbol \(|.|\) truncates the sign and gives the positive values and \(e_{1}^{\prime IPVO}\) and \(e_{2}^{\prime IPVO}\) represent the expanded errors obtained from Figure 2a. From Figure 2a, it can be observed that the EP-IPVO strategy tries to contain the distortion by limiting the modifications. For applying the EP-PEE strategy on the pixels (e.g., \(x_{1}\), \(x_{2}\)) of the group, two prediction errors are calculated using Equations (16) and (17), respectively. \[e_{1}^{PEE}=x_{1}-[\mu_{1}] \tag{16}\]  
\[e_{2}^{PEE}=x_{2}-[\mu_{2}] \tag{17}\]  
where \([\mu_{1}]\) and \([\mu_{1}]\) are the rounded-off local moments of the pixels \(x_{1}\) and \(x_{2}\), respectively. Next, the modification of the prediction errors is performed using the EP-PEE mapping strategy [13] as shown in Figure 2b. The pixels (\(x_{1}\), \(x_{2}\)) of the group are then modified using following Equations (18) and (19), respectively. \[x_{1}^{\prime}=[\mu_{1}]+e_{1}^{\prime}{}^{PEE} \tag{18}\]  
\[x_{2}^{\prime}=[\mu_{2}]+e_{2}^{\prime}{}^{PEE} \tag{19}\]  
\(e_{1}^{\prime}{}^{PEE}\) and \(e_{2}^{\prime}{}^{PEE}\) represent the expanded errors obtained from Figure 2b. For applying the S-PEE strategy on the pixels (e.g., \(x_{1}\)) of the group, first a prediction error (\(e^{S-PEE}\)) is calculated, such as \(e^{S-PEE}=x_{1}-[\mu_{1}]\). Next, the pixel is modified to embed the secret data bits using the following Equation (20). \[x_{1}^{\prime}=\left\{ \begin{array}{l}x_{1}+b_{1}\text{ if }e^{S-PEE}=0,\\ x_{1}+1\text{ if }e^{S-PEE}>0,\\ x_{1}-b_{1}\text{ if }e^{S-PEE}=-1,\\ x_{1}-1\text{ if }e^{S-PEE}<-1,\end{array} \right. \tag{20}\]  
where \(b_{1}\) is a bit of secret data that can be either '0' or '1'.