# A Self-Recovery Fragile Image Watermarking with Variable Watermark Capacity
## The Proposed Scheme
### Three-Level Tamper Detection  
In the receiving or detection side, the received image might be tampered by potential attackers. To detect and locate the tampered regions, a three-level tamper detection strategy [25] is applied in the proposed method, which is shown in Figure 3.  
(1)In the first level detection (1 in Figure 3), the encrypted authentication watermark is firstly extracted from the image block, which can be expressed as \(\mathbf{P}_{\text{e}}^{\prime}=(p_{\text{e1}}^{\prime},p_{\text{e2}}^{\prime})\). With the secret key \(key1\), a corresponding decryption process is conducted to the extracted watermark, and then we get the decrypted authentication watermark \(\mathbf{P}^{\prime}=(p_{1}^{\prime},p_{2}^{\prime})\). According to the generation process of authentication watermark in Section 3.1.1, a new authentication watermark for this block is regenerated, which is expressed as \(\mathbf{P}^{\prime}=(p_{1}^{\prime\prime},p_{2}^{\prime\prime})\). If \(\mathbf{P}^{\prime}\
eq\mathbf{P}^{\prime}\), then the detected block is marked as a tampered block, else it is marked as an authentic block. (2)In the second level detection (2 in Figure 3), the recovery watermark of the block is firstly extracted from its mapping block generated by Equation (9), which is expressed as \(\mathbf{R}_{\text{e}}^{\prime}\). Then, with the secret key \(key2\), a decryption process is performed on \(\mathbf{R}_{\text{e}}^{\prime}\), and the decrypted recovery watermark \(\mathbf{R}^{{}^{\prime}}\) is obtained. If the block is a smooth block, the length of \(\mathbf{R}^{{}^{\prime}}\) is 6 bits, else the \begin{table}
\begin{tabular}{c c c} \hline
**Parameters** & **Value Ranges** & **Functions** \\ \hline \(M\times M\) & \(256\times 256\) & Image size of the test images used in this paper \\ \(N\) & \((M\times M)/(2\times 2)\) & Total image blocks in host image \\ \(T_{1}\), \(T_{2}\) & \(T_{1}=0.48\), \(T_{2}=0.52\) & Thresholds used for block classification in this paper \\ \(k\) & A prime number \& \(k\in[1,N-1]\) & Secret key used to generate the block mapping sequence \\ \(key1\), \(key2\) & Non-negative integers & Secret keys used to generate the pseudo-random sequences \\ \hline \end{tabular}
\end{table} 
Table 1: Parameters used in watermark generation and embedding processes. Figure 3: Three-level detection strategy used in this paper. length of \(R^{{}^{\prime}}\) is equal to 10 bits. Accordingly, a new recovery watermark \(R^{{}^{\prime}}\) for the current block is regenerated, which has the same process as Section 3.1.1. At last, a comparison process is applied for the extracted recovery watermark \(R^{{}^{\prime}}\) and the newly created watermark \(R^{{}^{\prime\prime}}\). If \(R^{{}^{\prime}}\
eq R^{{}^{\prime\prime}}\), then the detected block is marked as a tampered block, else it is marked as an authentic block. 3. After the first two level detections, we get the preliminary tamper detection result. However, due to the fact that the tamper detection process is based on the image blocks, there might be a probability of misjudgment. In other words, an authentic image block might be falsely detected as a tampered block, and a truly tampered block might be detected as an authentic block. To further improve the tamper detection accuracy, the third level detection is applied (3 in Figure 3). This process is completed by using the block-neighborhood tampering characterization [27]. For a suspicious block \(A\) shown in Figure 4, \(n\) is used to represent the number of the blocks that are detected as tampered in its block-neighborhood (the blocks in gray in Figure 4). If the central image block \(A\) is a valid block while the number of the tampered blocks in its block-neighborhood is more than 7 (\(n\geq 7\)), then the block \(A\) will also be determined as an invalid block. If the central image block \(A\) is a tampered block while the number \(n\) is less than 2 (\(n<2\)), then the image block \(A\) will be determined as a valid block.