Creation of GLCM
Process is the creation of the GLCM which is a square matrix of order
MxM in size where M represents the Number of levels specified under
Quantization. The step by step procedure of the matrix creation is as
follows.
First the selected Feature is calculated. This calculation uses only the
values in the GLCM.
- Energy
- Entropy
- Contrast
- Homogeneity
- Correlation
- Shade
- Prominence
The sample‘s’ in the resulting virtual variable is replaced by the
value of this calculated feature.
A gray level co-occurrence matrix (GLCM) encompasses details regarding
positions of pixels that possess similar gray levels by considering
matching pixel pairs followed by selection and counting. This is done
by taking the first pair of pixel ‘i’ and its matching pair ‘j’ which
is dislocated from the foremost pixel ‘i’ by a distance ‘d’ which is
entered in the ith row and jthcolumn of the matrix Pd [i,j]. This matrix Pd [i,j] is need
not be symmetric, as the count of pairs of pixels having gray levels
[i,j] is not equivalent to the number of pixel pairs having gray
levels [j,i].
A gray level co-occurrence matrix (GLCM) holds details concerning the
positions of pixels having similar level of gray level values while a
two dimensional co-occurrence matrix P, in which both the rows and the
columns represent a set of possible image values. A GLCM Pd [i,j]
is defined by first specifying a displacement vector d=(dx, dy) and
counting all pairs of pixels separated by ‘d’ having gray levels ‘i’
and ‘j’. The GLCM is defined by where n,i,j is the number of
occurrences of the pixel values (i, j) lying at distance ‘d’ in the
image. The co-occurrence matrix Pd has dimension n× n, where ‘n’ is
the number of gray levels in the image. From the co-occurrence matrix
obtained the 12 different statistical features are proposed to be
developed.