# Evaluation of a Framework for Robust Image Reversible Watermarking
## 2 Evaluation of the Robust Framework for Robust Reversible Image Watermarking
### Selection of Schemes
#### 2.2.2 Self-Recovery Schemes  
The scheme by [26] is a self-recovery one, where reference bits and check bits are inserted into the images themselves to restore the original samples and identify the tampered regions. The embedding process uses a difference expansion (DE) strategy to insert both references and check bits in all the blocks of the host image; if the watermark inserted in one region of the image is altered, the rest of the watermark bits are not altered. The image can be recovered using the reference bits extracted from non-tampered regions. The embedding process divides the image into blocks of size \(8\times 8\), and then, each block is divided into 16 sub-blocks, where changeable and unchangeable pixels are assigned. For each changeable pixel, the inequality \(g_{m}(i,j)\geq g_{u}\) is verified:  
\[g_{u}+[g_{m}(i,j)-g_{u}]\cdot 2+1\leq 255. \tag{7}\]  
If \(g_{m}(i,j)<g_{u}\), then:  
\[g_{u}+[g_{m}(i,j)-g_{u}]\cdot 2\leq 255, \tag{8}\]  
where \(g_{m}\) represents the grayscale values of the changeable pixels for each block and \(g_{u}\) are the pixels designated as unchangeable of each block. When Equations (7) and (8) are fulfilled, the pixel \(g_{m}(i,j)\) is deemed as unusable, otherwise as usable. Afterwards, the reference bits are generated, taking as the base the pixels from the original image. Then, the check bits are calculated in order to identify the tampered regions, using a 64 bit hash function. The embedding strategy used is DE using the following equation:  
\[\tilde{g}_{m}=g_{u}+[g_{m}(i,j)-g_{u}]\cdot 2+w, \tag{9}\]  
where \(w\) is constructed with the reference and check bits to be embedded. For the extraction process, the image is divided into \(N/64\) blocks and \(N/4\) sub-blocks, in the same way as in the embedding process, where \(N\) is the total number of pixels in the image. The check and reference bits are extracted to identify the tampered and reserved blocks. Finally, the original grayscale values from all the pixels in the blocks identified as tampered are restored. The scheme by [27] proposes a secure block mechanism, resilient to content replacement attacks. To locate the tampered blocks, it uses the unaltered pixels and the reference bits to estimate the original five MSB of the altered pixels, using an iterative and exhaustive restoration mechanism. The embedding process divides the image in a pseudo-random manner using a secret key \(k_{1}\) in a subset of \(m\) pixels. The reference bits \(br_{i}\) are calculated, using Equations (10) and (11), and the \(br_{i}\) bits are embedded into the third LSB of the pixels in each subset. \[br_{i}=H(\hat{x}_{i,1},\cdots,\hat{x}_{i,m}) \tag{10}\]\[\hat{x}_{i,j}=\lfloor\frac{x_{i,j}}{8}\rfloor\mod 16,j=1,\cdots,m, \tag{11}\]  
where \(H(. )\) is a hash function, \(\lfloor.\rfloor\) is the floor function, and \(\hat{x}\in[0,15]\) is the decimal value of the bits \(b_{4},\cdots,b_{7}\) of each pixel \(x_{ij}\). A second set of reference bits \(br_{2}\) is calculated using Equations (10) and (12). The image is divided into subsets of \(m\) pixels, each using a second secret key \(k_{2}\). A hash function with the five MSBs of each pixels for every subset is calculated, then \(br_{2}\) is embedded into the pixels of each subset. \[\hat{x}_{i,j}=\lfloor\frac{x_{i,j}}{8}\rfloor,j=1,\cdots,m. \tag{12}\]  
Then, the image is divided into non-overlapped blocks of size \(8\times 8\). Afterward, the authentication code \(ca\) for each block is calculated using Equation (13), which is inserted in the LSB of every pixel in each block. \[ca_{i}=I\|n_{1}\|\ \|n_{2}\|\ p_{i}, \tag{13}\]  
where \(I\) is an exclusive index associated with each image, \(p_{i}\) is the index of the block, and \(\|n_{1}\|\) and \(\|n_{2}\|\) is the bit concatenation of the image size. The extraction process divides the image in non-overlapped blocks of \(8\times 8\), as in the embedding process.