# 3D Texture Feature Extraction and Classification Using GLCM and LBP-Based Descriptors
## 2 Background  
### Local Binary Patterns (LBP)  
The Local Binary Patterns (LBP) operator is a texture descriptor that is widely used in literature in many computer vision applications due to its efficiency in describing local texture structures, simplicity, speed of computation and robustness to illumination variations [7]. The LBP operator provides a local representation of textured images which is obtained by computing differences between neighbouring pixels. By considering a neighbourhood around each pixel, an LBP code is computed for each image spatial location. The feature vector is obtained by computing the histogram of all LBP codes. The improved LBP variant proposed in [7] (based on the original formulation [21]) considers circular neighbourhoods of variable sizes which allows the generation of texture features at different scales. By adopting a multi-resolution approach as proposed in the same paper, a degree of invariance to the change of the observation scale can also be attained. The multi-resolution strategy implies the concatenation of feature vectors obtained at different scales. The authors also propose a uniformity criterion in order to improve the rotation invariance of the extracted features. The uniform patterns are the ones with at most two bitwise transitions in the pattern. As pointed out in [7], if there is a large number of spatial transitions in the pattern, it is more likely that the pattern will change to a different one during rotation. The uniformity criterion improves the rotation invariance, but also reduces the size of the feature vector. Moreover, a noisy pattern creates fluctuations below or above the value of the central pixel due to the random character of the noise which results in many transitions in the pattern. By considering the uniformity criterion, the noisy patterns are considered as non-uniform and are discarded instead of being interpreted as a strong contrast between the central pixel and its neighbours. The number of transitions is expressed by a uniformity function, U. The uniform rotation invariant LBP (riu2) is computed using:  
\[\mathrm{LBP}_{\mathrm{R,P}}^{\mathrm{riu2}}(\mathrm{x}_{\mathrm{c}})=\left\{ \begin{array}{ll}\sum\limits_{n=0}^{P-1}\mathrm{s}(\mathrm{x}_{\mathrm{c}}- \mathrm{x}_{\mathrm{R,P,n}}),&\mathrm{if}\,\mathrm{U}(\mathrm{LBP}_{\mathrm{R,P}})\ \leq\ 2\\ \mathrm{P}+1,&\mathrm{otherwise}\end{array}\right. \tag{1}\]  
where \(\mathrm{x}_{\mathrm{c}}\) is the central pixel, \(\mathrm{s}(\mathrm{x})\) is the sign function given in (2), \(\mathrm{x}_{\mathrm{R,P,n}}\) is the nth neighbour pixel from a neighbourhood having P neighbours and a radius R and U is the uniformity function;  
\[\mathrm{s}(\mathrm{x})=\left\{\begin{array}{ll}0,&\mathrm{if}\ \mathrm{x}<0\\ 1,&\mathrm{if}\ \mathrm{x}\geq 0\end{array}\right. \tag{2}\]  
In a neighbourhood with P neighbours, there are exactly P + 1 uniform patterns. Each uniform pattern is labelled separately depending on the number of bits of 1 in the pattern, but all non-uniform patterns are labelled together under the mixed label P + 1. The histogram corresponding to the obtained LBP codes has a number of P + 2 bins. The non-uniform patterns can be discarded and thus, the final feature vector is of size P + 1 [7].