# 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.1 Fragile Reversible Watermarking Schemes  
The scheme by [23] uses a histogram shifting technique, using the high correlation of neighboring pixels in each block of the image; the authors use a threshold \(K\) to insert the watermark bits; based on the difference values calculated for each block, the embedding strategy is divided into two categories: positives and negatives. The embedding strategy first divides the image in blocks of size \(2\times 2\), \(4\times 4\) or \(8\times 8\) pixels. Then, the difference values are calculated using the following equation:  
\[\alpha=\frac{1}{n}\sum_{i=1}^{n}(a_{i}-b_{i}), \tag{1}\]  
where \(n\) is the number of pairs of pixels, \(a_{i}\) are all the pixels marked with (+), and \(b_{i}\) are all the pixels marked with (\(-\)). After the difference values have been calculated, a threshold \(K+\) is selected using Equations (2) and (3) and a threshold \(K-\) using Equations (4) and (5):  
\[K_{ph}=\Big{[}\Big{(}\frac{\alpha_{\text{maxP}}-\alpha_{\text{zero}}+1}{ \text{Partition level}}\Big{)}\Big{]}, \tag{2}\]  
\[K+=K_{ph}+\text{mod}(K_{ph},2), \tag{3}\]  
\[K_{Nh}=\Big{[}\Big{(}\frac{\alpha_{\text{zero}}-\alpha_{\text{minN}}+1}{ \text{Partition level}}\Big{)}\Big{]}, \tag{4}\]  
\[K-=-1\times(K_{Nh}+\text{mod}(K_{Nh},2)), \tag{5}\]  
where \(\alpha_{\text{maxP}}\) is the maximum difference value of the positive part, \(\alpha_{\text{zero}}\) is 0 for the center of the coordinate, Partition level is the number of the partition, \(\alpha_{\text{minN}}\) is the minimum difference value of the negative part, and \([\cdot]\) is the ceiling function. The watermark bits are inserted based on the values of \(\alpha\), according to the following conditions:  
* If \(\alpha\geq 0\), there can be three cases: **Case 1**: \(0\leq\alpha\leq k\); if 1 is inserted, the histogram from that block is shifted a distance \(k\) to the right; if a 0 is inserted, the block is left intact. **Case 2**: \(k\leq\alpha\leq 2k\); if a 1 is inserted, the histogram from that block is shifted a distance \(2k\) to the right; if a 0 is inserted, the block is shifted a distance \(k\) to the right. **Case 3**: \(2k\leq\alpha\leq 3k\); if a 1 is inserted, the histogram from that block is shifted a distance \(3k\) to the right; if a 0 is inserted, the block is shifted a distance \(2k\) to the right. * If \(\alpha<0\), there can be three cases: **Case 1**: \(-k\leq\alpha\leq 0\); if 1 is inserted, the histogram from that block is shifted a distance \(k\) to the left; if a 0 is inserted, the block is left intact. **Case 2**: \(-2k\leq\alpha\leq-k\); if a 1 is inserted, the histogram from that block is shifted a distance \(2k\) to the left; if a 0 is inserted, the block is shifted a distance \(k\) to the left. **Case 3**: \(-3k\leq\alpha\leq-2k\); if a 1 is inserted, the histogram from that block is shifted a distance \(3k\) to the left; if a 0 is inserted, the block is shifted a distance \(2k\) to the left. To extract the watermark bits, the image is divided into blocks in the same way as for embedding. Then, the difference values are calculated using Equation (1). After the difference values are obtained, the threshold \(K\) is obtained in the following way:  
\[K=K_{ph}+\text{mod}(K_{ph},2), \tag{6}\]where \(\alpha_{\text{maxP}}\) is the maximum difference value of the positive part, \(\alpha_{zero}\) is 0 for the center of the coordinate, Partition level is the number of the partition, and \(\lceil.\rceil\) is the ceiling function. Finally, the watermark bit is extracted using the threshold \(K\) and the original image is reconstructed. The scheme by [24] uses a histogram shifting technique as well; it divides the intensity range into non-overlapped segments and seeks the peak pixel, i.e., the pixel with a more significant occurrence in the histogram of each segment. Bit insertion is performed only in the peak pixels, except for each segment's first peak pixel, which is a reference for extraction. These schemes use a location map where all the peak pixels are marked.