## 3 Fluctuation Function and Decoding of the Proposed System
### Codeword Extraction and Matching  
In order to extract the codeword bit that is embedded in a block located in the \(a\)-th row and \(b\)-th column, \(d^{(0)}_{i,j}\) and \(d^{(1)}_{i,j}\) for \(as\leq i<(a+1)s\), \(bs\leq j<(b+1)s\) are calculated as:  
\[d^{(0)}_{i,j}= \begin{cases}p^{\prime}_{i,j}\oplus h_{w}&\text{for }(i,j)\in S_{0}(a,b)\\ p^{\prime}_{i,j}&\text{otherwise},\end{cases}  \tag{9}\]  
\[d^{(1)}_{i,j}= \begin{cases}p^{\prime}_{i,j}\oplus h_{w}&\text{for }(i,j)\in S_{1}(a,b)\\ p^{\prime}_{i,j}&\text{otherwise}.\end{cases}  \tag{10}\]  
If the codeword bit is zero, \(d^{(0)}_{i,j}\) is the same as \(p_{i,j}\), but \(d^{(1)}_{i,j}\) is \(\overline{p_{i,j}}\) according to (8) and (9). Similarly, if the codeword bit is one, then \(d^{(1)}_{i,j}\) is the same as \(p_{i,j}\), but \(d^{(0)}_{i,j}\) is \(\overline{p_{i,j}}\) according to (8) and (10). In each block, this means that \(d^{(a)}_{i,j}\) is the same as \(p_{i,j}\) if \(a\) is the same as the codeword bit; otherwise, \(d^{(a)}_{i,j}\) is \(w\) LSBs flips of \(p_{i,j}\). The hidden codeword bits are determined by comparing each fluctuation function and have the lower value of the fluctuation function due to spatial correlation in natural images. We consider the two fluctuation functions to determine hidden codeword bits: [PERSON]'s fluctuation function [4] and [PERSON]'s fluctuation function [5]. The first fluctuation functions, \(f_{Z}(a,b)^{(0)}\) and \(f_{Z}(a,b)^{(1)}\), are calculated as:  
\[f_{Z}(a,b)^{(0)}\!\!=\!\!\sum_{i=2}^{s-1}\sum_{j=2}^{s-1}\left|d^{(0)}_{i,j}- \frac{d^{(0)}_{i-1,j}\!+d^{(0)}_{i,j-1}\!+d^{(0)}_{i+1,j}\!+d^{(0)}_{i,j+1}}{4 }\right|, \tag{11}\]  
\[f_{Z}(a,b)^{(1)}\!\!=\!\!\sum_{i=2}^{s-1}\sum_{j=2}^{s-1}\left|d^{(1)}_{i,j}- \frac{d^{(1)}_{i-1,j}\!+d^{(1)}_{i,j-1}\!+d^{(1)}_{i+1,j}\!+d^{(1)}_{i,j+1}}{4 }\right|. \tag{12}\]  
Hong's fluctuation functions, \(f_{\text{H}}(a,b)^{(0)}\) and \(f_{\text{H}}(a,b)^{(1)}\), are represented as:  
\[f_{\text{H}}(a,b)^{(0)}\!\!=\!\!\sum_{i=1}^{s}\sum_{j=1}^{s-1}\left|d^{(0)}_{i, j}\!-d^{(0)}_{i,j+1}\right|\!+\!\!\sum_{i=1}^{s-1}\sum_{j=1}^{s}\left|d^{(0)}_{i,j} -d^{(0)}_{i+1,j}\right|, \tag{13}\]  
\[f_{\text{H}}(a,b)^{(1)}\!\!=\!\!\sum_{i=1}^{s}\sum_{j=1}^{s-1}\left|d^{(1)}_{i, j}\!-d^{(1)}_{i,j+1}\right|\!+\!\!\sum_{i=1}^{s-1}\sum_{j=1}^{s}\left|d^{(1)}_{i,j} -d^{(1)}_{i+1,j}\right|. \tag{14}\]  
For calculating the fluctuation function, the distance from the average value from neighboring pixels is used to find the the difference when the \(w\) LSBs in the pixels are flipped. In [PERSON]'s fluctuation functions (11) and (12), the distance from the average value is calculated. However, the distance of boundary pixels in each block is omitted. Especially, for small \(s\), the value of the fluctuation function is small, and estimation from the fluctuation functions becomes worse. For example, \(s=8\), 56.3% \((=36/64\times 100)\) pixels can be used to determine the fluctuation functions. In contrast, boundary pixels in the left or upper corner are included in [PERSON]'s fluctuation functions (13) and (14). However, the distances from neighboring lower and right pixels are used, and large vertical or horizontal distance is dominant. Therefore, a small number of pixels in each block can be dominant to calculate the fluctuation functions when the pixels are widely different from neighboring pixels. To utilize the two fluctuation functions, the new fluctuation functions, \(f_{\rm K}(a,b)^{(0)}\) and \(f_{\rm K}(a,b)^{(1)}\), are proposed as:  
\[ \begin{array}{rcl}f_{\rm K}(a,b)^{(0)}&=&\sum_{i=1}^{s}\sum_{j=2}^{s-1}\left| d_{i,j}^{(0)}-\frac{d_{i,j-1}^{(0)}+d_{i,j+1}^{(0)}}{2}\right|\\ &&\left.+\sum_{i=2}^{s-1}\sum_{j=1}^{s}\left|d_{i,j}^{(0)}-\frac{d_{i-1,j}^{(0 )}+d_{i+1,j}^{(0)}}{2}\right|,\\ &&f_{\rm K}(a,b)^{(1)}&=&\sum_{i=1}^{s}\sum_{j=2}^{s-1}\left|d_{i,j}^{(1)}- \frac{d_{i,j-1}^{(1)}+d_{i,j+1}^{(1)}}{2}\right|\\ &&\left.+\sum_{i=2}^{s-1}\sum_{j=1}^{s}\left|d_{i,j}^{(1)}-\frac{d_{i-1,j}^{(1 )}+d_{i+1,j}^{(1)}}{2}\right|.\end{array}