# Data Hiding Method for Color AMBTC Compressed Images Using Color Difference
## 4 Proposed Method
### DH Embedding Procedure  
In Section 4.1, we introduced a method of compressing the original image with the proposed color AMBTC encoding method. After performing the AMBTC, it was shown that compression bits are 95 per block. In this section, we propose a method to embed  
Figure 2: The proposed color AMBTC generation process. secret bits while minimizing distortion using OPAP. The secret bits are embedded in the compressed \(\mathcal{CI}\) depending on the procedure in Figure 3. The blocks in \(\mathcal{CI}\) are composed of a common bit-plane and three quantization levels for R, G, and B, respectively. Nine quantization levels and a common bit-plane may embed 18 bits (9 \(\times\) 2 bits) and 16 bits per block, respectively. The detailed DH embedding procedure is described in stages. Input: Color AMBTC compressed image, \(\mathcal{CI}\); block size, \(n\times n/(m\times m)\); secret bits, \(\mathcal{S}\)  
Output: Color AMBTC marked image, \(\mathcal{MI}\)  
Step 1: Read a block from \(\mathcal{CI}\) and assign it to \(\mathcal{P}_{i}\), where \(i\in\{1\leq i\leq(n\times n)/(m\times m)\}\). Step 2: The quantization levels of block \(\mathcal{P}_{i}\) is assigned to the variable \(Q_{i}\), where the range of \(j\) is \(\{1\leq j\leq 9\}\) and \(Q_{j}\in\{0,1,\ldots,255\}\). Thereafter, LSB and 2 LSB are extracted from \(Q_{j}\) using Equation (12). Next, the secret bit \(S_{k}\)(1 bit) is concealed in the 2 LSB of \(Q_{j}\) according to the rule of Equation (13), i.e., \(\mathcal{P}_{i}^{\prime}(j)=\sum_{j=1}^{9}f(\mathcal{P}_{i},\mathcal{S}_{k})\), where \(f\) is a function of the embedding logic. \[Q_{j}=\sum_{j=1}^{9}\mathcal{P}_{i}(j) \tag{11}\]  
\[\left\{ \begin{array}{ll}b_{j}^{1}\xrightleftharpoons[]{\text{LSB}}Q_{j} \bmod 2\\ b_{j}^{2}\xrightleftharpoons[]{\text{2 LSB}}\{Q_{j}/2\}\bmod 2\end{array}  \tag{12}\]  
\[Q_{j}^{\prime}=\left\{ \begin{array}{ll}Q_{j}-1,&\text{if}(b_{j}^{2}=0\wedge b _{j}^{1}=0)\wedge S_{k}=1\\ Q_{j}+1,&\text{if}(b_{j}^{2}=0\wedge b_{j}^{1}=1)\wedge S_{k}=1\\ Q_{j}-1,&\text{if}(b_{j}^{2}=1\wedge b_{j}^{1}=0)\wedge S_{k}=0\\ Q_{j}+1,&\text{if}(b_{j}^{2}=1\wedge b_{j}^{1}=1)\wedge S_{k}=0\end{array} \right. \tag{13}\]  
After performing Step 2, nine bits are hidden in the 2 LSB of nine quantization levels. Step 3: Embedding the secret bit \(\mathcal{S}_{k}\) in XOR (2 LSB \(\oplus\) LSB) of \(Q_{j}^{\prime}\) depends on the OPAP rule (Equation (14)), where 2 LSB \(\oplus\) LSB is \((b_{j}^{2}\oplus b_{j}^{1})\). Since the pixel value of \(Q_{j}^{\prime}\) can be changed by Equation (13), Equations (11) and (12) are recalculated to extract 2 LSB and LSB again. The function call for Equation (14) is \(\mathcal{P}_{i}^{\prime}(j)=\sum_{j=1}^{9}f(\mathcal{P}_{i},\mathcal{S}_{k})\), where \(f\) is a function of the embedding logic. \[\mathcal{P}_{i}^{\prime}(j)=\left\{ \begin{array}{ll}Q_{j}^{\prime}-1,&\text{ if}(b_{j}^{2}=1\wedge b_{j}^{1}=1)\wedge S_{k}=1\\ Q_{j}^{\prime}+1,&\text{if}(b_{j}^{2}=1\wedge b_{j}^{1}=0)\wedge S_{k}=0\\ Q_{j}^{\prime}-1,&\text{if}(b_{j}^{2}=0\wedge b_{j}^{1}=1)\wedge S_{k}=0\\ Q_{j}^{\prime}+1,&\text{if}(b_{j}^{2}=0\wedge b_{j}^{1}=0)\wedge S_{k}=1\\ \text{\emph{nochange},~{}otherwise}\end{array} \right. \tag{14}\]  
Figure 3: Schematic diagram of DH structure. * A critical condition to embed a stream of secret bits into a common bit-plane is allowed when the difference between two quantization levels is less than \(T\). If \((Q_{1}^{\rm G}-Q_{2}^{\rm G})\leq T\), read a common bit-plane \(M\) from the block \(\mathcal{P}_{i}^{\prime}\) and perform Equation (15) to embed the secret bits into \(M\), i.e., \(P_{i}^{\prime}(j)=\sum_{j=1}^{32}f(M_{j},\mathcal{S}_{k})\), where \(f\) is a function of the logic. \[M_{j}:M_{j+1}=\left\{ \begin{array}{ll}dec(M_{j}:M_{j+1})+1,&\text{if}(M_{j+1 }\
eq\mathcal{S}_{k}\wedge M_{j}:M_{j+1}=00|01),\\ dec(M_{j}:M_{j+1})-1,&\text{if}(M_{j+1}\
eq\mathcal{S}_{k}\wedge M_{j}:M_{j+1}=1 0),\\ inc(j+2),inc(k).\end{array}