## 2 Feature Extraction
### GlRLM and Textural Features
#### 2.3.2 GlRLM Features  
After a run-length matrix is calculated along a given direction, several texture descriptors are calculated to obtain the texture properties and differentiate among different textures. These descriptors can be used either with respect to each direction or by combining them if a global view of the texture information is required. Eleven features are typically extracted from the run-length matrices: short run emphasis (SRE), long run emphasis (LRE), high-gray-level run emphasis (HGRE), low-gray-level run emphasis (LGRE), pairwise combinations of the length and gray level emphasis (SRLGE, SRHGE, LRLGE, LRHGE), run-length nonuniformity (RLN), gray-level nonuniformity (GLN), and run percentage (RPC). These features describe specific characteristics in the image. For example, SRE measures the distribution of short runs in an image, while RPC measures both the homogeneity  
Figure 9: GlRLM example. The first row is a \(4\times 4\) matrix with four gray levels and the others are the corresponding GLRLMs in 4 directions. and the distribution of runs of an image in a specific direction. The formulas for calculating the features and their explanation are as follows:  
1. Short Run Emphasis This describes the distribution of short runs. This value indicates how much a texture is composed of runs of short length in a given direction. \[\text{SRE}=\frac{1}{n_{r}}\sum_{i=1}^{M}\sum_{j=1}^{N}\frac{Q(i,j)}{j^{2}}\] (30) where \(n_{r}\) denotes the total number of runs. 2. Long Run Emphasis Similar to SRE, this describes the distribution of long runs. This value indicates how much a texture is composed of runs of long length in a given direction. These two features give more in-depth information about the coarseness of an image. \[\text{LRE}=\frac{1}{n_{r}}\sum_{i=1}^{M}\sum_{j=1}^{N}Q(i,j)\cdot j^{2}.\] (31)
3. Low-Gray-Level Run Emphasis This describes the distribution of low gray-level values. The more low gray-level values are in an image, the larger this value is. \[\text{LGRE}=\frac{1}{n_{r}}\sum_{i=1}^{M}\sum_{j=1}^{N}\frac{Q(i,j)}{i^{2}}.\] (32)
4. High-Gray-Level Run Emphasis This contrast, with low-gray-level run emphasis, it describes the distribution of high gray-level values. The higher gray-level values are in an image, the larger this value is. \[\text{HGRE}=\frac{1}{n_{r}}\sum_{i=1}^{M}\sum_{j=1}^{N}Q(i,j)\cdot i^{2}.\] (33)
5. Short-Run Low-Gray-Level Emphasis This describes the relative distribution of short runs and low gray-level values. The SRLGE value is large for an image with many short runs and lower gray-level values. \[\text{SRLGE}=\frac{1}{n_{r}}\sum_{i=1}^{M}\sum_{j=1}^{N}\frac{Q(i,j)}{i^{2} \cdot j^{2}}\] (34)
6. Short-Run High-Gray-Level Emphasis This describes the relative distribution of short runs and high gray-level values. The SRHGE value will be large for an image with many short runs and high gray-level values. \[\text{SRHGE}=\frac{1}{n_{r}}\sum_{i=1}^{M}\sum_{j=1}^{N}\frac{Q(i,j)\cdot i^{2 }}{j^{2}}.\] (35)
7. Long-Run Low-Gray-Level Emphasis This describes the relative distribution of long runs and low gray-level values. The LRLGE value will be large for an image with many short runs and high gray-level values. \[\text{LRLGE}=\frac{1}{n_{r}}\sum_{i=1}^{M}\sum_{j=1}^{N}\frac{Q(i,j)\cdot j^{2 }}{i^{2}}.\] (36)
8. Long-Run High-Gray-Level Emphasis This describes the relative distribution of long runs and high gray-level values. The LRHGE value will be large for an image with many short runs and high gray-level values. \[\text{LRHGE}=\frac{1}{n_{r}}\sum_{i=1}^{M}\sum_{j=1}^{N}Q(i,j)\cdot i^{2}\cdot j ^{2}.\] (37)Gray-Level Nonuniformity This describes the similarity of pixel values throughout the image in a given direction. It is expected to be small if the gray-level values are similar throughout the image. \[\mathrm{GLN}=\frac{1}{n_{r}}\sum_{i=1}^{M}\left(\sum_{j=1}^{N}Q(i,j)\right)^{2}. \tag{38}\]  
Run-Length Nonuniformity This describes the similarity of the length of runs throughout the image in a given direction.