## 3 Proposed Algorithm
The confidential data embedding procedure of the proposed technique is shown in Figure 9, and the procedure for extracting confidential data from the stego-image and restoring the original cover image from the stego-image is shown in Figure 10.  
Step 1. The cover image is scanned in inverse s-order. It is determined whether the pixel value is predictable at each location, and a prediction image is generated in one of two ways: If the current location is within Region1 where pixel values are predictable, Step 1.1 to 1.E are executed to generate a prediction image. If the current location is not within Region1, the pixel value is unpredictable at the current location. In this case, the prediction image is generated using the pixel value of the cover image. Step 2. The cover and prediction images are scanned in inverse s-order to generate the cover image sequence (C) and the prediction image sequence (P) composed of the respective pixel values. Step 3. Using C and P, the difference sequence (D) is generated according to Equation (40). \[\text{D}_{i}= \begin{cases}\text{C}_{i}&\text{if (i = 0)}\\ \text{C}_{i-1}-\text{C}_{i}&\text{Mode 1}\\ \text{C}_{i}-\text{P}_{i}&\text{Mode 2}\\ \text{P}_{i-1}-\text{C}_{i}&\text{Mode 3}\end{cases}  \tag{40}\]  
Mode 1: When the predicted pixel value was not used at the current and previous locations of the prediction image. Mode 2: When the predicted pixel value was used at the current location of the prediction image. Mode 3: When the predicted pixel value was not used at the current location of the prediction image; however, the predicted pixel value was used at the previous location of the prediction image. Step 4. After generating the histogram of D, the values PP, CZP, PP, and CZP\({}_{i}\) are determined. Step 5. By shifting D according to Equations (2) and (3), the shifted difference sequence (DS) is generated. Step 6. The embedded difference sequence (DE) is generated by embedding confidential data in DS according to Equation (4). Step 7. Using C and DE, the stego-image sequence (S) is generated according to Equation (5). Step 8. The stego-image is generated in inverse s-order using S.  
Figure 8: Three edges at �⃝. Figure 9: Confidential data embedding procedure of ARDHA. The original cover image is restored in inverse s-order using C.  
An example of embedding confidential data using the ARDHA technique is shown in Figure 11. An example of extracting the confidential data and restoring the original cover image using the ARDHA technique is shown in Figure 12. The values of the variables used in the examples shown in Figures 11 and 12 are as follows: The alpha (\(\alpha\)) used in Equations (9) to (10) was 0.45, the threshold (\(\beta\)) used in Step 1.4 to 1.5 was 10, the reference value (\(\varepsilon\)) used in Step 1.7 was 10.0, and the K used in Equation (26) was 4.0. The strong_edge, normal_edge, weak_edge, and very_weak_edge used in Equation (35) were 1.00, 0.75, 0.50, and 0.25, respectively. The difference threshold (\(\delta\)) used in Equation (37) was 1.6. The R\({}_{\text{S}}\), R\({}_{\text{N}}\), and R\({}_{\text{W}}\) used in Equations (36), (38), and (39) were 1.1, 0.9, and 0.7, respectively. The reasons for assigning specific values to the variables were explained in the next section. The predicted values V\({}_{1}\) obtained from Equation (9) at locations 1 to 1 in Figure 7b were 157.00, 156.30, 155.99, 156.40, 158.11, 156.87, 156.62, 157.25, 156.26, 156.88, 158.37, 160.84, 158.75, 156.93, and 155.84. If V\({}_{1}\) is applied to Equation (10), dev1 can be calculated at each location. The dev1 calculated at each location 1 to 1 were 13.40, 9.54, 6.62, 10.19, 19.89, 11.30, 9.96, 9.66, 15.30, 17.32, 12.21, 17.23, 25.15, 21.60, 20.12, and 18.99, correspondingly. If the surface characteristics of the  
Figure 10: Confidential data extraction procedure and the original cover image restoration procedure of ARDHA.