Mryka Hall-Beyer

Home
Contacts
Biography
Tutorial: GLCM Texture
Publications
Research
Courses
Students
Committees

What is texture?   The GLCM  Texture Calculations  Practical Notes   References

 Exercises   Examples   Equations

 

More information about  GLCM texture

This section contains various background information that may help solve a particular problem or answer more advanced questions. The topics covered are:

Where did the idea of texture come from?

Basic ideas about co-occurrence

How to choose among the texture measures, window sizes, and spatial relationships

The correlation of texture measures with one another

Other approaches to texture

 

Where did the idea come from?

 
Haralick et al. (1973) proposed 14 different measures. They include the ones detailed here, plus
 

  •  variance calculated on the sum of adjacent pixels,
     
  • variance calculated on the difference between adjacent pixels,
     
  • entropy on the sum and on the difference,
     
  • correlation involving entropies, and
     
  • the maximum correlation coefficient.
     

These have been adopted by much software. Haralick also suggested calculating each of the 14 measures for each of  the four directions, then taking the mean and range of each measure and using those values as signatures in classification. Again, this has not been widely adopted, except for the definition of an "invariant" spatial direction that is the average of the four directions. Instead, single texture measures, or at most two or three, have been chosen and incorporated into training signatures or unsupervised classification procedures. This avoids incorporating highly correlated data into a classification scheme (details below)

 

 

 

Co-occurrence of two pixels: some basic ideas

Spatial relation: The relation between reference and neighbour may be in any one of 8 directions (N, S, E, W, or the four diagonals). Only half of these are actually used, since W is the opposite of E and there are simpler ways to account for W than counting it separately. "Spatially invariant" relations may be chosen by counting in four directions (N, NE, E, SE) and then summing the counts.
 

Why only two pixels? It is in theory possible to choose three or more pixels in a given relation (for example, a reference pixel, its neighbour to the right and also its neighbour to the NE). However, this becomes extremely unwieldy for calculations and is not an operational procedure. Besides, experience has shown that the simpler texture measures are generally more useful than are more complex ones in terms of improving classification accuracy. A calculation involving three pixels would be "third order" and so forth.
 
 

 

 

There is a very large number of possible texture calculations: how to choose

Texture measurement requires the choice of

  • window size,
  • direction of offset,
  • offset distance,
  • which channel to run,
  • which measure to use.


It would not be conceptually unreasonable to have 7 window sizes, 5 directions, 3 distances, 6 channels and 10 measures, for a total of 6,300 measures for a single Landsat Thematic Mapper image! This is clearly impractical.

There is unfortunately no way of predicting for certain which of these possible measures will be most useful. However, there are some rules of thumb.

  • Visual examination of the image channels can help eliminate some of them. For vegetation, the nir and red channels would be most useful, or some combination of them such as a vegetation index. Principal components can also reduce channel numbers. Supposing we can eliminate 5 channels, the possibilities above are reduced to 1050.
  • Visual examination will also show any directionality that is likely to be important on the image. If there is none, "spatially invariant" (average of all directions) is the best choice. Supposing we can eliminate 4 directions, possibilities are reduced to 210.
  • A distance between pixels is almost always 1 pixel. Supposing we can eliminate 2 distances, we are down to 70. Some applications suggest calculating the same measure at progressively larger distances, which approaches the methods used with autocorrelation, semivariograms or multifractal dimension.
     
  • Many of the texture measures are correlated with one another. There are really only at most 4 or 5 truly independent textures (see below). By reducing to 4 measures we are down to 28 possibilities.
  • Best window size may be guessed by visual inspection of the image, or,
     
  • With this number (28), techniques of feature selection can be used (for example comparison of mean and minimum Bhattacharyya Distance or Transformed Divergence, or a Discriminant Analysis method), or tests can be run to see which measures yield a higher accuracy. Consult a good image processing textbook for more information on feature selection.
     
    • Clausi (2002) worked on classification using texture of SAR sea ice imagery. He analyzed correlation among textures to determine the best subset of texture measures. He found that Contrast, Correlation and Entropy used together outperformed any one of them alone, and also outperformed using these and a number of others all together. If only one can be used, he recommends choosing among Contrast, Dissimilarity, Inverse Difference Moment Normalized (what we have called Homogeneity) or Inverse Difference normalized (what we have called Similarity).
    • Clausi also summarized the texture measures found to be useful in a number of SAR sea-ice studies. He found Entropy always used, and Contrast and Correlation a close second (Clausi 2002 Table 2, p. 47).
    • These conclusions are interesting, but cannot be assumed to apply to images that are not of sea ice.


 
    
 

Correlation of texture measurements with one another
    Because of the way the texture equations are constructed, many of them are correlated with one another.

Example: Contrast uses a weight of (i-j)2 and Dissimilarity uses a weight of (i-j). Otherwise there is no difference between them. The range of values will be different, but the two measures contain essentially the same information. Since correlation coefficients (r) are a measure of linear correlation, and these two will be related exponentially, r will not be 1.0. Nonetheless it is very high.

Most of the texture measures within a given group are strongly correlated. In addition, GLCM Variance in the statistics group), being a measure of variability, is closely related to the contrast group of measures. The following values all assume the same window size. The correlation coefficient will vary somewhat from image to image, but the general trend is clear. In the image shown here,

  • Homogeneity is correlated with Contrast,  r = -0.80
  • Homogeneity is correlated with Dissimilarity, r = -0.95
  • GLCM Variance is correlated with Contrast,  r= 0.89
  • GLCM Variance is correlated with Dissimilarity,  r= 0.91
  • GLCM Variance is correlated with Homogeneity,  r= -0.83
  • Entropy is correlated with ASM,  r= -0.87

GLCM Mean and Correlation are more independent. For the same image,

  • GLCM Mean shows  r< 0.1 with any of the other texture measures demonstrated in this tutorial.
  • GLCM Correlation shows  r<0.5 with any other measure.

 

For detailed images for each of these texture measures, click on the Examples button in the header menu.


Practically, then, for classification purposes choose one of the contrast measures, one of the orderliness measures, and two or three at most of the descriptive statistics measures. Which one you choose will depend on the textures of the classes desired. Consult a good image processing textbook for more information on feature selection.

 

 

 

Other approaches to texture:

The GLCM explained here is not the only texture measure that has been proposed. However, it is the most commonly implemented one. See Jensen (1996) for the idea of a "texture spectrum" originally proposed by He & Wang(1990). This is an interesting approach to characterizing image classes, but it has the disadvantage of requiring a very large number of pixels within each class to be useful as a classification tool. 
 

Much work is now being done  characterizing texture using semivariograms, spatial autocorrelation using Moran's I or Geary's C statistics, fractal dimension, wavelet analysis, lacunarity, and others. There is an extensive literature on each that is not covered here. Van der Sanden and Hoekman (2005)  have demonstrated that GLCM Contrast is identical to semivariance, and GLCM Correlation provides almost identical information as provided by autocorrelation methods.  Pearlstine et al. (2005) suggest other textures, such as statistics (mean, median, std deviation) of density of edges following edge-enhancing filtering of various kinds.

 

BACK      NEXT