Skip to content

GLCM_global_features

Aditya P. Apte edited this page Jul 16, 2018 · 23 revisions

The feature definitions are available in IBSI section 3.6

List of available features

1. Auto-correlation (Aerts et al, 2014) is a measure of the magnitude of the fineness and coarseness of texture.


2. Joint Average (Unser, 1986) is the grey level weighted sum of joint probabilities.


3. Cluster Prominence measure asymmetry of the GLCM. Higher value indicates more asymmetry whereas a lower value indicates peak of the distribution centered around the mean.


4. Cluster Shade measures skewness of the GLCM matrix and is believed to gauge the perceptual concepts of uniformity. Higher value indicates asymmetry.


5. Cluster Tendency is a measure of groupings of voxels with similar gray-level values. It has been shown by Aerts et al that this features is equivalent to sum variance. Hence, it is a measure of heterogeneity that places higher weights on neighboring intensity level pairs that deviate more from the mean Aerts et al.


6. Contrast is a measure of the local variations presented in an image. This measure of contrast favors contributions from p(i, j) away from the diagonal. It is highly correlated with the difference between the highest and the lowest values of a continuous set of pixels. If there is a large amount of variation in an image, the contrast will be high.


7. Correlation measures the linear dependency of gray levels on those of neighboring pixels or specified points. It indicates local gray-level dependency on the texture image; higher values can be obtained for similar gray-level regions.


8. Difference Entropy measures the disorder related to the gray level difference distribution of the image.


9. Dissimilarity (Difference Average) measures the mean of the gray level difference distribution of the image. A larger value implies greater disparity in intensity values among neighboring voxels.


10. Difference Variance is a measure of heterogeneity that places higher weights on differing intensity level pairs that deviate more from the mean.


11. Joint Energy is a measure of homogeneity of an image. A homogeneous scene will contain only a few gray levels, so that GLCM will have a few but relatively high values of p(i, j). Thus, the sum of squares will be high. It is the monotonic gray-level transition; higher values indicate textural uniformity. Therefore, when the image is homogeneous, the Energy feature will have high values.


12. Joint Entropy measures the randomness of the image texture (intensity distribution). Entropy is the highest when all the probabilities p(i, j) are equal, and smaller when the entries in p(i, j) are unequal. Therefore, a homogeneous image will result in a lower entropy value, while an inhomogeneous (heterogeneous) region will result in a higher entropy value.


13. Inverse Difference is a measure of local homogeneity of an image. Higher value indicates more homogeneous image.


14. Inverse Difference Moment measures the local homogeneity of an image. The incidence of co-occurrence of pixel pairs is enhanced when they are close in gray-scale value and thus increases the IDM value. Because of the weighting factor 1/(1 + (i − j)^2), it will get small contributions from inhomogeneous areas i ≠ j. The result is a low IDM value for inhomogeneous images, and a relatively higher value for homogeneous images.


15. Informal Measure of Correlation (IMC) 1


16. Informal Measure of Correlation (IMC) 2


17. Inverse Difference Moment Normalized Like Inverse Difference Moment, but the difference between the neighboring intensity values is normalized by the total number of discrete intensity values.


18. Inverse Difference Normalized Like Inverse Difference, but the difference between the neighboring intensity values is normalized by the total number of discrete intensity values.


19. Inverse Variance


20. Sum Average measures the mean of the gray level sum distribution of the image.


21. Sum Entropy measures the disorder related to the gray level sum distribution of the image.


22. Sum Variance measures the dispersion (with regard to the mean) of the gray level sum distribution of the image


23. Haralick Correlation


24. Joint Maximum


25. Joint Variance refers to the gray-level variability of the pixel pairs and is a measurement of heterogeneity. Variance increases when the gray-scale values differ from their means. Unlike contrast, variance has no spatial frequency. Although a high variance is suggestive of a high contrast value, the converse relationship does not apply.


where


is the Co-occurrence matrix.
is the normalized co-occurence matrix.
is the number of gray levels
is the marginal row probabilities
is the marginal column probabilities
is the mean gray level intensity of
is the standard deviation of







Calculation details

Let quantizedM be the discretized scan matrix. Now, let's build the co-occurrence matrix. The directional offsets can be obtained using the getOffsets function. The input argument to this function tells it to return 3-d or 2-d directional offsets. 13 offsets are computed for 3-d whereas 4 offsets are computed for the 2-d directionality based on the distance criteria of 1 voxel. Currently, the getOffsets function returns the directional offsets only for the distance criteria of 1 (immediate neighbors). In order to use the distance criteria other than 1, the user will have to provide the appropriate offsets.

dirFlag = 1; % 1: 3-d, 2: 2-d
offsetsM = getOffsets(dirFlag);

The co-occurrence matrix can be built separately or combined for each directional offset. The cooccurType argument to the calcCooccur function controls this.

cooccurType = 1; % 1: combine, 2: separate GLCMs

The co-occurrence matrix is computed as follows:

cooccurM = calcCooccur(quantizedM, offsetsM, numGrLevels, cooccurType);

cooccurM is of size (numGrLevels*numGrLevels) x 1 for cooccurType = 1, or (numGrLevels*numGrLevels) x size(offsetsM,1) for cooccurType = 2, i.e. each column containing cooccurrence matrix for a row of offsetsM. Note that in both the cases, vectorized co-occurrence matrix is returned.

Generate flags for individual features

glcmFeatC = {'energy',    'jointEntropy',    'jointMax',    'jointAvg',    'jointVar',    'contrast',...
    'invDiffMoment',    'sumAvg',   'corr',    'clustShade',    'clustProm',...
    'haralickCorr',    'invDiffMomNorm',    'invDiff',    'invDiffNorm',    'invVar',...
    'dissimilarity',    'diffEntropy',    'diffVar',    'diffAvg',    'sumVar',...
    'sumEntropy',    'clustTendency',    'autoCorr',    'firstInfCorr',    'secondInfCorr'};
glcmFlagS = cell2struct(num2cell(ones(size(glcmFeatC))),glcmFeatC,2);

Finally, the scalar features from the GLCM matrix are obtained as follows:

featureS = cooccurToScalarFeatures(cooccurM, flagS);

For cooccurType = 2;, i.e. separate feature calculation per direction, the final feature can be obtained by combining the directional features using the following: average, maximum, minimum, standard deviation and mean absolute deviation. For example, to use the average from all directions:

featureReduceType = 'avg';
featureAvgS = reduceDirFeatures(featureS ,featureReduceType );
Clone this wiki locally