Skip to main content
. 2017 Nov 2;12(11):e0186876. doi: 10.1371/journal.pone.0186876

Fig 2. Principles of generating texture analysis features.

Fig 2

Principles of generating the histogram and the variables gray-level run-length matrix (GLRLM) and gray-level co-occurrence matrix (GLCM) from a given ROI. To construct the GLCM each pixel of the ROI is once compared with a pixel in a given distance and direction (0°, 45°, 90° or 135°). For each value pair the GLCM is increased by 1 in the respective column and row (in the given example a distance of 1 and direction of 90° were used; one 2–1 pair was found and 1 was added to the matrix accordingly). Runs of the same grey-level in a given direction (0°, 45°, 90° or 135°) are assessed to construct the GLRLM and used as the x-axis in the matrix, whereas the y-axis contains the assessed grey-levels. The example shows one run of three 2’s and a 1 is added to the matrix accordingly (a direction of 90° was used).