## 3 Proposed Method
### Extraction and Recovering Procedure  
Upon successfully receiving the two marked images, \(\Delta I_{1}\) and \(\Delta I_{2}\), sent by the sender, the receiver can proceed to apply the following data extraction and recovery methods step by step. This enables the extraction of the secret data sent by the sender and the recovery of the original image as follows:  
**Input**: Two stego images, \(\Delta I_{1}\) and \(\Delta I_{2}\). **Output**: An original image, \(I\) and recovered secret data, \(m^{\prime}\). **Step 1:**: For the two stego images, \(\Delta I_{1}\) and \(\Delta I_{2}\), each of size \(N\times N\), identify the stego pixels \(y_{i}^{1}\in\Delta I_{1}\) and \(y_{i}^{2}\in\Delta I_{2}\). Use the index \(i\) to indicate the sequence of each pixel pair;
**Step 2:**: Select a pair of corresponding stego pixels, \(y_{i}^{1}\) and \(y_{i}^{2}\). Calculate the extraction function \(f\) for these pixels using Equation (5);
**Step 3:**: For every pair of stego pixels, \(y_{i}^{1}\) and \(y_{i}^{2}\), compute and extract the secret message \(s\) utilizing the function \(f\). Store the extracted secret message \(s_{i}\) in the vector \(m_{i}^{\prime}\) to compile the recovered secret data;
**Step 4:**: To restore the original pixel value \(x_{i}\) from the stego pixels \(y_{i}^{1}\) and \(y_{i}^{2}\), apply Equation (6) as follows:  
\[p_{i}=\left\lfloor\frac{(y_{i}^{1}+y_{i}^{2})}{2}\right\rfloor \tag{6}\]  
This step calculates the value of \(p_{i}\) by averaging the values of the two stego pixels and applying the floor function to round down to the nearest integer. The resulting value of \(p_{i}\) represents the \(i^{th}\) original pixel in the recovered image \(I\). This process is expressed in detail in pseudocode in Algorithm 2. In other words, the function ExtractRecover(\(y_{i}^{1},y_{i}^{2}\)) of Algorithm 2 is called. The ExtractRecover function receives \(y_{i}^{1}\) and \(y_{i}^{2}\) as parameters and extracts data and restores the original pixels. When this process is completed, the data \(m_{i}^{\prime}\) hidden in the two pixels and the restored pixel \(p_{i}\) are returned;
**Step 5:**: Allocate \(p_{i}\) to the \(i^{th}\) pixel of the reconstructed image \(I\). Continue this method for every pixel pair in the stego images until the full original image is restored. By methodically applying these steps to the stego images, the method accurately reconstructs the original image and securely extracts the hidden message. This procedure highlights the reversible nature of our steganography method, demonstrating its efficiency and reliability in data recovery. ```
1:procedureExtractRecover(\(y_{i}^{1},y_{i}^{2}\)) \(\triangleright\) Input: Stego pixel pairs \((y_{i}^{1},y_{i}^{2})\) from \(\Delta I_{1}\) and \(\Delta I_{2}\). 2: Initialize vector \(m_{i}^{\prime}\) to store recovered 5-ary data. 3: Initialize vector \(p\) to store original pixel values. 4:for each pixel pair \((y_{i}^{1},y_{i}^{2})\)do
5:\(f\leftarrow(y_{i}^{1}\cdot 1+y_{i}^{2}\cdot 2)\ mod\ 5\); \(\triangleright\) Compute \(f\) for modulo operation. 6:\(s\leftarrow\) Extracted secret data based on \(f\). 7: Append \(s\) to vector \(m_{i}^{\prime}\). 8:\(p_{i}\leftarrow\left\lfloor\frac{(y_{i}^{1}+y_{i}^{2})}{2}\right\rfloor\); \(\triangleright\) Recover original pixel value. 9: Append \(p_{i}\) to vector \(p\). 10:endfor
11:return\(m_{i}^{\prime}\), \(p\)\(\triangleright\) Output the recovered 5-ary data and original pixel values. 12:endprocedure
```  
**Algorithm 2** Data extraction and original image recovery  
This algorithm outlines the procedure for extracting hidden data and reconstructing the original image from two stego images. The process begins by iterating through each pair of stego pixels, \((y_{i}^{1},y_{i}^{2})\), in the modified images \(\Delta I_{1}\) and \(\Delta I_{2}\). For each pixel pair, the algorithm calculates \(f\) using the specified modulo operation, then extracts the secret data \(s\) relying on \(f\), and subsequently appends this data to the vector \(m_{i}^{\prime}\) to compile the recovered secret data.