# Local Ternary Cross Structure Pattern: A Color LBP Feature Extraction with Applications in CBIR
## 3 Feature Extraction  
### Five-Level Color Quantizer  
Inspired by the color prior knowledge in the CIELAB color model, a novel five-level color quantizer is designed for the color quantization map (CQM) extraction. For convenience, the original [\(-\)128, +127] is mapped as 28. In our scheme, 28 is first subdivided into four blocks at Level 1, in which two blocks 28/3 are on both sides, and two refined blocks 27/3 are in the middle because most pixels focus on the middle third of the range. The corresponding indices are sequentially flagged as 0, 1, 2, and 3 at Level 1. Then, two refined blocks 27/3 are subdivided into to two refined 27/32 in the middle and two 28/32 on both sides from Level 1 to 2. In this manner, the pixels in the middle range can be further refined. The remaining blocks are duplicated from Level 1 to 2. Finally, two operators of \"Duplicate\" and \"Subdivide\" are sequentially repeated until the two middle blocks 27/35 at Level 5. We combine Level 1 to 5 to construct the five-level color quantizer. For clarity, the process is displayed in Figure 2, in which each level contains a group of blocks and indices. Mathematically, the quantization levels in the a* and b* components are flagged as \(A_{\text{a*}}\) and \(A_{\text{b*}}\), where \(A_{\text{a*}}\in\{1,2,\ldots,5\}\) and \(A_{\text{b*}}\in\{1,2,\ldots,5\}\). Meanwhile, the corresponding indices in the a* and b* components are flagged as \(\hat{A}_{\text{a*}}\) and \(\hat{A}_{\text{b*}}\), where \(\hat{A}_{\text{a*}}\in\{0,1,\ldots,2(A_{\text{a*}}+1)-1\}\) and \(\hat{A}_{\text{b*}}\in\{0,1,\ldots,2(A_{\text{b*}}+1)-1\}\) respectively.  
Moreover, in terms of the humans' eye intensity perception mechanism [40], the original scope [0, +100] in the L* component is quantized into 3 blocks, e.g., [0, +25], [+26, +75] and [+76, +100]. Similarly, the quantization level in the L* component is flagged as \(A_{\text{L*}}\), where \(A_{\text{L*}}=1\) and the index is defined as \(\hat{A}_{\text{L*}}\in\{0,1,2\}\).  
An example of the proposed color quantization scheme is shown in Figure 3. From Figure 3a, the values in the CIELAB color model are set to L* = +87 in the L* component, a* = +84 in the a* component, and b* = -28 in the b* component. Correspondingly, the quantization levels are set to \(A_{\text{L*}}=1\), \(A_{\text{a*}}=2\) and \(A_{\text{b*}}=2\) respectively. From Figure 3b, according to \(A_{\text{L*}}=1\), the L* component is firstly quantized to 3 blocks, e.g., [0, +25], [+26, +75] and [+76, +100], and then the index of L* = +87 can be encoded as \(\hat{A}_{\text{L*}}=2\). From Figure 3c,d, considering \(A_{\text{a*}}=2\) and \(A_{\text{b*}}=2\) in the FLCQ quantizer, the a* and b* components are firstly quantized to six blocks, e.g., 28/3, 28/32, 27/32, 27/32, 28/32 and  
Figure 2: The details of the five-level color quantizer.  
\(2^{8}/3\), and then the indices of a* = +84 and b* = \(-82\) is encoded as \(\hat{A}_{\text{a*}}=5\) and \(\hat{A}_{\text{b*}}=1\) respectively. We combine the indices of \(\hat{A}_{\text{L*}}\), \(\hat{A}_{\text{a*}}\), and \(\hat{A}_{\text{b*}}\) to acquire the color quantization map (\(CQM\)), and the index of \(CQM\) is flagged as \(E\), \(E\in\{0,\,1,\,\ldots,3\times 2(A_{\text{a*}}+1)\times 2(A_{\text{b*}}+1)-1\}\).