# 3D Texture Feature Extraction and Classification Using GLCM and LBP-Based Descriptors
## 3 The Proposed Method
### The Improved 3D Gray-Level Co-Occurrence Matrix (IGLCM_3D)
#### 3.2.3 Computation of the Three Gradient-Based Matrices and the Corresponding Feature Vectors  
Figure 8 illustrates the block diagram describing the computation of the gradient-based matrices. The following four steps are considered: noise reduction, computation of the gradient image, computation of GMCM, AACM and EACM matrices and of the feature vectors. The three co-occurrence matrices are based on the gradient image. In order to prevent the detection of false edges caused by noise, we employ a 3D Gaussian smoothing filter. The considered parameters for this filter were chosen as a trade-off between noise elimination and attenuation of edges: the size of the kernel is of \(5\times 5\times 5\), the mean of the 3D Gaussian function is 0 and the standard deviation is \(\sigma~{}=~{}2\). For preventing illumination changes, a normalization is performed at the end of this step. Figure 7: Feature vector computation from Haralick indicators. For computing the gradient image, the 3D Sobel operator is used since it offers noise robustness and computational efficiency. The considered 3D Sobel masks are the ones provided by Matlab [30]. After the computation of the gradient image, three parameters are obtained: the gradient magnitude given in (13), gradient azimuth angle given in (14) and gradient elevation angle given in (15). They are quantized using 32 levels and used for constructing the GMCM, AACM and EACM matrices. The three matrices are computed for all 13 independent directions and two distances (1 voxel and 2 voxels) and are normalized after computation. In the last step, three feature vectors are computed: the GMCM feature vector (gradient magnitude-based feature vector), the AACM feature vector (azimuth-based feature vector) and the EACM feature vector (elevation-based feature vector). The gradient magnitude-based feature vector is extracted from the GMCM matrix. As gradient-based indicators, we proposed in [29] the following measures:  
* Quantity of strong edges (Q): \[\mathrm{Q}=\sum_{i=1}^{\mathrm{Nq}}\sum_{j=1}^{\mathrm{Nq}}(i-j)^{2}\times \mathrm{GMCM}_{n}(i,j)\] (16) where \(\mathrm{GMCM}_{n}\) is the normalized version of GMCM. A high value for Q indicates that there are many strong edges. This indicator favours substantial gradient changes for neighbouring voxels in the considered image. * Slightly textured image indicator (STI): \[\mathrm{STI}=\sum_{i=1}^{\mathrm{Nq}}\sum_{j=1}^{\mathrm{Nq}}\frac{1}{1+(i-j) ^{2}}\times\mathrm{GMCM}_{n}(i,j)\] (17) This indicator favours voxel pairs situated near the principal diagonal and implies that the encountered edges are weak, so the considered input image is slightly textured. * Uniformity (U): \[\mathrm{U}=\sum_{i=1}^{\mathrm{Nq}}\sum_{j=1}^{\mathrm{Nq}}(\mathrm{GMCM}_{n}( i,j))^{2}\] (18)  
Figure 8: The calculation of the GMCM, AACM and EACM matrices (© [2020] IEEE. Reprinted [adapted], with permission, from [29]). A large value for U means that there are high values in the GMCM matrix. Since this matrix is normalized and its terms are expressed as probabilities, this implies that there are only a few high values. This leads to the conclusion that there are few edges and the image presents textural uniformity. * Strong edges indicator (S): \[\text{S}=\sum_{\text{i}=1}^{\text{Nq}}\sum_{\text{j}=1}^{\text{Nq}}\text{i}^{2 }\times\text{GMCM}_{\text{n}}(\text{i},\text{j})\] (19)  
S favours large gradients, a high value indicating that there are many strong edges in the analysed textured image. These indicators are computed for each GMCM matrix. The gradient magnitude-based feature vector is obtained by considering the same strategy used for the Haralick features as described in Figure 7. The final gradient magnitude-based feature vector contains 16 characteristics as detailed in appendix A.