3
sum of squared differences between intensity levels in the
GLCM. A high contrast value indicates that neighboring
pixels have significantly different intensity values, result-
ing in a texture with sharp transitions and well-defined
boundaries between different regions in the image. On the
other hand, a low contrast value indicates that neighboring
pixels have similar intensity values, suggesting a smoother
and more uniform texture. Contrast is particularly useful
in identifying textures with strong edges and fine details.
Correlation: measures the linear relationship between
intensity levels in the image. It is calculated as the covari-
ance of the intensity levels in the GLCM divided by the
product of their standard deviations. A high correlation
value indicates that the pixel intensities change linearly
with respect to the distance and direction in the image,
and the texture appears more ordered and regular in the
image. On the other hand, a low correlation value indicates
a weaker linear relationship between pixel intensities. This
implies that neighboring pixels have less linear dependence,
and the texture appears more random and disordered in
the image. It provides information about the regularity and
orientation of textures in the image.
Dissimilarity: measures the average difference in pixel
intensities between neighboring pixels. It is calculated as
the sum of the absolute differences between gray levels of
pixel pairs, weighted by the frequency of occurrence of
those pixel pairs in the GLCM. A high dissimilarity value
indicates that neighboring pixels have significantly different
intensity values. This means that the texture in the image
appears more diverse and has sharp transitions between
pixel intensities. Dissimilarity is particularly useful in cap-
turing the level of contrast and variation in the texture of an
image. It should be noted that both contrast and dissimilar-
ity provide information about the variations in gray levels
within an image however, they do so in slightly different
ways. Dissimilarity focuses on the absolute differences
between gray levels in co-occurring pairs and is suitable
for identifying coarse textures, while contrast emphasizes
the squared differences between gray levels in co-occurring
pairs, which tends to highlight variations in fine details and
local contrast within the texture.
Energy: measures the uniformity or regularity of the
GLCM. It is also known as Angular Second Moment
(ASM) and is calculated as the sum of squared elements of
the GLCM. A high energy value implies that neighboring
pixels tend to have similar intensity values, resulting in a
smoother and less textured appearance in the image.
Homogeneity: measures the closeness of the distribu-
tion of elements in the GLCM to the main diagonal. It
is calculated as the sum of the products of each gray level
pair divided by 1 plus the square of their difference. A high
homogeneity value implies that neighboring pixels tend to
have similar intensity values, resulting in a more regular
and smooth texture appearance in the image. On the other
hand, a low homogeneity value indicates that neighboring
pixels have diverse intensity values, indicating a more com-
plex and heterogeneous texture in the image.
GLCM Application Example
The classification of coal and shale with GLCM features
is taken as an example to demonstrate the effectiveness
of GLCM in capturing different image textures. Due to
the variations in composition and sedimentary environ-
ment, coal and shale have distinct differences in textures
(Xue, 2022). It can be expected that there are significant
differences in the calculated GLCM features. As shown
in Figure 1, part of a rib image with coal and shale was
extracted with 500 pixels along each side was used for the
demonstration. Small patches with a side length of 50 pix-
els were extracted from coal and shale. Four patches were
extracted from shale and coal, respectively, resulting in a
total of 8 patches. The location of the patches is marked
on the rib image, and the enlarged view of the patches are
displayed separately in Figure 1. It can be found with naked
eyes that the images for coal and shale are different. The
color for shale images is mainly gray or dark gray and the
whole images look smooth, while the color for coal images
is mainly black and white (brightness) and the white spots
are surrounded by the black. At some edges, there are sharp
changes in the color. How will the difference in image tex-
tures represent in the calculated GLCM features? GLCM
features were then calculated along the horizontal direction
for each patch, and the results are summarized in Figure 1
with correlation and dissimilarity as an example. It can be
observed that the shale images have lower dissimilarity and
correlation levels than the coal images, making the data
points for shale concentrated at the lower left corner. The
way that the data is spread makes it easy to classify shale
and coal.
The above analysis with coal and shale demonstrates the
power of the GLCM method in capturing the differences in
the image texture between coal and rock. However, it can
be found from the enlarged views of patches in Figure 1
that there are distinct differences in the image textures
between coal and shale. The next question will be whether
the method can be used to classify different coal lithotypes
based on the texture. It can be expected that there will be
no such distinct difference as shown in Figure 1, and it will
need more detailed textures to classify coal lithotypes.
Previous Page Next Page