# Hybrid Data Hiding Based on AMBTC Using Enhanced Hamming Code
## 3 The Proposed Scheme
### Examples  
Here, we will show how to minimize the errors in the encoding process through an optimized method rather than the existing method. The detailed procedure of our proposed DH is explained by the process shown in Figure 6 using \(trio(103,109,000001000111011)\) and secret bits \(m=(101101011110001100)\). Since \(b-a=109-103=6\leq T(7)\), the \(trio\) is classified as a smooth block. Therefore, in Figure 2, the data concealment process proceeds according to the processing corresponding to the smooth block of the \(trio\). From now on, the process shown in Figure 6a will be explained step-by-step.  
(1) The two quantization levels of a given \(trio\) are assigned to variables \(a\) and \(b\) and then converted to binary, i.e., \(a=103=01100111_{2}\) and \(b=109=01101101_{2}\).  
Figure 4: The flowchart of the lookup codeword with \(m\). HC, Hamming Code.  
For the two converted binary numbers, the four LSB (\(a=(0110\underline{0111}_{2})\) of \(a\) and the three LSB (\(b=(01101\underline{101}_{2})\)) of \(b\) are extracted.  
To form a codeword, the extracted binary numbers are combined; that is, \(y=(0111||101)_{2}\).  
Calculate \(y^{\prime}=(bin2 dec(0111)\ bin2 dec(101))=(7\ 5)\).  
After converting the bit \(m(=101)\) to decimal, the value \(d=5\) is retrieved from the coset leaders of the standard array of HC (\(7\),\(A\)).  
Using Equation (9), the codeword having the minimum distance from the given codeword is retrieved from the table. Here, \((a-\mathbb{Z})^{2}+(b-\mathbb{4})^{2}=1\) corresponds to the minimum distance.  
The new codeword is \(h=(7||4)=(0111||100)_{2}=(0111100)_{2}\).  
Two quantization levels embedding three secret bits are recovered by using the codeword \(h\). A new quantization level is obtained by replacing the upper four bits and the lower three bits of \(h\) obtained in the process of (7), respectively, with four LSB and three LSB of two quantization levels. That is, the recovered codewords are \(a=103\) and \(b=108\).  
In Figure 5(b), we explain a way of embedding secret bits into the bitmap.  
1. First, it is necessary to check whether a given block belongs to a smooth block. That is, if the difference between the absolute values of two given quantization levels is less than the threshold \(T\), it is a smooth block, otherwise it belongs to a complex block. In Figure 5(b), the difference between two given quantization levels is less than the defined threshold \(T\), so it belongs to a smooth block.
2. Since the block in the given example is a smooth block, sixteen bits are concealed in the bitmap by replacing the 16 bit secret bits (\(m=(1010\ 1111\ 0000\ 1100)\)) directly with the bitmap.  
Figure 5: The flowchart of the extracting procedure.  
To extract secret bits from two quantization levels, we need to construct a codeword using the quantization levels. To construct the codeword, the procedure of Figure 6a is followed. That is, the codeword \((y=0111100)\) is obtained by extracting four LSB (0111) and three LSB (100) from two quantization levels \(a(=103)\) and \(b(=108)\) and combining them. Here, we obtain the hidden secret bits, \(\overline{m}=(101)\), by using the equation, \(S=y\cdot H^{T}\), to the codeword. The decoding of the secret bits in the BM extracts the hidden bits by moving all pixels in the BM into a variable \(\overline{m}\) array directly.