Figure 3.
Explanation of the calculation of texture features from a grey-level co-occurrence matrix (GLCM). For simplicity, a 4 × 4 pixel grey-scale image with only three grey-levels (i.e. light-grey [≡1], dark-grey [≡2], and black [≡3]) was chosen. In Step 1, the grey-scale image is transcribed to a corresponding grid of numeric grey-levels. A GLCM is deducted from this grid by considering the relationship of every pixel to its neighbourhood. For this example, a ‘neighbour pixel’ was defined as one that is located immediately to the right of each ‘reference pixel’. We start with the light-grey [≡1] pixel in the left-upper corner. It’s ‘neighbour’ is a black [≡3] pixel, meaning that a light-grey [≡1] and black [≡3] pixel ‘co-occurred’, as indicated by the red circle in the diagram. There is one other co-occurrence of light-grey [≡1] and black [≡3] in the diagram (highlighted by a green circle). In Step 2, the count of all possible co-occurrences is recorded in a table, which - after its completion - is named the GLCM. In Step 3, the GLCM is normalized so that each cell doesn’t contain a count of every possible co-occurrence but its probability. These probabilities provide the basis for the calculation of the various texture features according to the equations shown (Step 4). In a ‘real-world’ application of this principle, ‘neighbourhood’ can be defined in various ways by changing the directions and distances between ‘reference pixels’ and ‘neighbour pixels’.