# A Large Capacity Histogram-Based Watermarking Algorithm for Three Consecutive Bins
## 3 The Proposed Method
### Embedding and Extraction of the Watermark
#### 3.3.1 Watermark Embedding Rules  
Given the octal watermark information \(W\in(0,1,2,3,4,5,6,7)\) with the length of \(L_{W}\), it can be converted into the binary watermark information \(W_{B}\in(0,1)\) with the length of \(3\times L_{W}\). The obtained binary watermark information was further transformed into a key-based PNsequence to enhance the security of the watermark. With respect to the private key utilized during watermark encryption, it can be shared with specific authorized receivers if one needs to detect the presence of the watermark [13]. For an easy explanation, Table 1 presents the various embedding rules under different watermark information. \begin{table}
\begin{tabular}{c c c c c} \hline \hline \multirow{2}{*}{**Case**} & **Original** & **Its Binary** & **Pixel Modification Rules** \\  & **Watermark** & **Type** & & \\ \hline
1 & 0 & 000 & a\({}^{\prime}\)=\(\lfloor(a+b+c)/3\rfloor+\Delta_{1}\), & b\({}^{\prime}\)=\(\lfloor(a+b+c)/3\rfloor+\Delta_{2}\), & c\({}^{\prime}\)=\(\lfloor(a+b+c)/3\rfloor+\Delta_{3}\) \\
2 & 1 & 001 & a\({}^{\prime}\)=\(\lfloor(a+b+c)/4\rfloor+\Delta_{1}\), & b\({}^{\prime}\)=\(\lfloor(a+b+c)/4\rfloor+\Delta_{2}\), & c\({}^{\prime}\)=\(\lfloor(a+b+c)/2\rfloor+\Delta_{3}\) \\
3 & 2 & 010 & a\({}^{\prime}\)=\(\lfloor(a+b+c)/4\rfloor+\Delta_{1}\), & b\({}^{\prime}\)=\(\lfloor(a+b+c)/2\rfloor+\Delta_{2}\), & c\({}^{\prime}\)=\(\lfloor(a+b+c)/4\rfloor+\Delta_{3}\) \\
4 & 3 & 011 & a\({}^{\prime}\)=\(\lfloor(a+b+c)/5\rfloor+\Delta_{1}\), & b\({}^{\prime}\)=\(\lfloor(2\times(a+b+c)/5\rfloor+\Delta_{2}\), & c\({}^{\prime}\)=\(\lfloor 2\times(a+b+c)/5\rfloor+\Delta_{3}\) \\
5 & 4 & 100 & a\({}^{\prime}\)=\(\lfloor(a+b+c)/2\rfloor+\Delta_{1}\), & b\({}^{\prime}\)=\(\lfloor(a+b+c)/4\rfloor+\Delta_{2}\), & c\({}^{\prime}\)=\(\lfloor(a+b+c)/4\rfloor+\Delta_{3}\) \\
6 & 5 & 101 & a\({}^{\prime}\)=\(\lfloor 2\times(a+b+c)/5\rfloor+\Delta_{1}\), & b\({}^{\prime}\)=\(\lfloor(a+b+c)/5\rfloor+\Delta_{2}\), & c\({}^{\prime}\)=\(\lfloor 2\times(a+b+c)/5\rfloor+\Delta_{3}\) \\
7 & 6 & 110 & a\({}^{\prime}\)=\(\lfloor 2\times(a+b+c)/5\rfloor+\Delta_{1}\), & b\({}^{\prime}\)=\(\lfloor 2\times(a+b+c)/5\rfloor+\Delta_{2}\), & c\({}^{\prime}\)=\(\lfloor(a+b+c)/5\rfloor+\Delta_{3}\) \\
8 & 7 & 111 & a\({}^{\prime}\)=\(\lfloor(a+b+c)/6\rfloor+\Delta_{1}\), & b\({}^{\prime}\)=\(\lfloor(a+b+c)/3\rfloor+\Delta_{2}\), & c\({}^{\prime}\)=\(\lfloor(a+b+c)/2\rfloor+\Delta_{3}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Pixel modification rules for various watermark information (where \(\Delta_{1},\Delta_{2},\Delta_{3}\in[0,1]\)). First, we transform the original watermark into its binary type. For various watermark data, pixel modification rules are slightly different. Note that having eight types of situations is mainly attributed to two factors: one is that the approximately equal pixel number of adjacent bins is considered here. The other is that every three consecutive bins is partitioned into a group to perform watermark embedding. Unlike other histogram-based watermark methods [14; 15; 16], these methods do not consider this case in their watermark designs; thus, only one-bit watermark data can be embedded into each of the three consecutive bins. In the proposed methods, every 3 bits of watermark information can be simultaneously embedded into each of the three consecutive bins. This is also why pixel modification rules for various watermark data are required. For clarity, we give a simple example to explain the relationship between binary watermark information and its corresponding formula. Suppose \(a\), \(b\), and \(c\) denote the original three consecutive bins before watermark embedding and \(a^{\prime}\), \(b^{\prime}\), and \(c^{\prime}\) denote the corresponding modified bins after watermark embedding, respectively. Let us define the proportional relationship of binary watermark information \"0\" and \"1\" as 1:2 to distinguish various types of watermark.