# An Enhanced Adaptive Block Truncation Coding with Edge Quantization Scheme +
## 2 Previous Works  
### AMBTC and MBTC  
In [2], [PERSON] and [PERSON] propose AMBTC, the variation of BTC, which has a simple computation. Compared with BTC, it requires less computation time. AMBTC still preserves the higher mean and lower mean of each block and uses these two values to quantize output. It provides better image quality than BTC, as well as reasonable computational complexity. In AMBTC, an image is first subdividedinto non-overlapping (\(k\times k\))-sized blocks, where \(k\) may be set to be (\(4\times 4\)), (\(6\times 6\)), (\(8\times 8\)) and so on. AMBTC adopts block-wise operation. For each block, the mean pixel value \(\bar{x}\) is calculated by  
\[\bar{x}=\frac{1}{k\times k}\sum_{i=1}^{k^{2}}x_{i} \tag{1}\]  
where \(x_{i}\) denotes the \(i\)-th pixel in this block. Each pixel value \(x_{i}\) is compared with the mean value \(\bar{x}\) using Equation (2). If \(x_{i}\) is greater than or equal to \(\bar{x}\), \(b_{i}\) becomes 1, otherwise \(b_{i}\) becomes 0. That is, a bitmap \(M=[b_{i}]\) of the same block size which consists of two clusters is generated.  
\[b_{i}=\begin{cases}1,&\text{if }x_{i}\geq\bar{x},\\ 0,&\text{if }x_{i}<\bar{x}.\end{cases} \tag{2}\]  
AMBTC preserves two quantization values per block and the higher mean and the lower mean. Equation (3) describes the method of generating two quantized values in each block. Here, \(t\) denotes the number of \"1\" in each bitmap \(M\), i.e., the number of pixels under \(x_{i}\geq\bar{x}\). \(\lfloor\cdot\rfloor\) is the floor function is the function that takes as input as real number \(x\), and gives as output the greatest integer less than or equal to \(x\), denoted \(\text{floor}(x)\), or \(\lfloor x\rfloor\). The means \(\mu_{1}\) and \(\mu_{0}\) are, respectively, the higher and lower means based on \(\bar{x}\).  
\[\mu_{1}=\left\lfloor\frac{1}{t}\sum_{x_{i}\geq\bar{x}}x_{i}\right\rfloor\text {and }\mu_{0}=\left\lfloor\frac{1}{(k\times k)-t}\sum_{x_{i}<\bar{x}}x_{i}\right\rfloor. \tag{3}\]  
Finally, a block of the image is compressed into two quantization levels (\(\mu_{0}\), \(\mu_{1}\)) and bitmap \(M\), i.e., trio \((\mu_{0},\mu_{1},M)\). A bitmap \(M\) contains the bit-planes that represent the pixels, and the values \(\mu_{0}\) and \(\mu_{1}\) are used to decode the AMBTC compressed image. For the case \(k=4\), i.e., we deal with an image by \((4\times 4)\) block-wise operation. Sixteen pixels in a block are represented as a trio \((\mu_{0},\mu_{1},M)\) of \(8+8+16\) = 32 bits, and thus the CR is \((16\times 8)/32\) = 4. Consider the example of a \(512\times 512\)-pixel image. The file size of 2 \(M\) bits can be reduced to 0.5 \(M\) bits. In decoding phase, when two quantization levels and the bitmap obtained, the corresponding image block can be easily reconstructed by replacing every \"1\" in a bitmap \(M\) with \(\mu_{1}\), while every \"0\" is replaced with \(\mu_{0}\).  
Because AMBTC provides better image quality and the fast computation, most BTC-based data hiding schemes and secret image sharing schemes adopt AMBTC approach. In [3], the authors proposed a MBTC by using max-min quantizer to further enhance the quality of reconstructed image. In AMBTC, the threshold value used for distinguishing two clusters is simply using the mean value \(\bar{x}\) in a block. A threshold value \(x_{th}\) of MBTC in Equation (4) is obtained by calculating the average value of the maximum value (\(x_{max}\)), minimum value (\(x_{min}\)), and mean value (\(\bar{x}\)) in a block.  
\[x_{th}=\frac{(x_{max}+x_{min}+\bar{x})}{3}. \tag{4}\]  
Afterwards, by the same argument of AMBTC but using \(x_{th}\) instead of \(\bar{x}\), we may obtain a trio for each block in MBTC.