GLCM Texture Feature

This operator produces a virtual variable which represents a GLCM texture image of a single beam echogram.

It accepts a single operand of one of the following data types:

Settings

The GLCM Texture Feature Variable Properties dialog box pages include (common) Variable Properties pages and these operator pages:

Operands page

GLCM Texture page

This page allows you to select GLCM, gray level and texture feature settings.

Setting

Description

Feature

Select a GLCM texture feature from the list:

Window size

Specifies the window size for the GLCM texture feature. The window size defines the area of samples used for GCLM tabulations and texture calculations.

Setting

Description

Length

Length of window (pings). The length is restricted to an odd number in the range 3 to 999.

Height

Height of the window (samples). The height is restricted to an odd number in the range 3 to 999.

Quantization

Specifies parameters so that sample intensity can be assigned to discrete gray levels for the calculation of the GCLM. Each gray level represents a range of sample intensity values.

Setting

Description

Minimum value

The minimum sample intensity value. This defines the start of the minimum gray level. Sample intensities below the Minimum value are assigned to the minimum gray level.

Maximum value

The maximum sample intensity value. This defines the end of the maximum gray level. Sample intensities above the Maximum value are assigned to the maximum gray level.

Number of levels

Specifies the number of gray levels between the Minimum and Maximum values. Restricted to a number in the range 2 to 256.

Notes:

  • No Data samples are not affected by quantization.
  • Boundary samples of the echogram (i.e. those for which the surrounding window is not filled with data) are assigned the No Data value.

Spatial Relationship

Defines the spatial relationship between the reference sample and the neighbor sample used in tabulations for the GLCM.

For example:

Direction = Horizontal, Distance = 1 defines the neighbor sample to be one sample to the right of the reference sample.

Setting

Description

Direction

Select the direction of the spatial relationship from the following list:

  • Horizontal
  • Vertical
  • Diagonally up
  • Diagonally down

Distance

Select the distance between the reference and neighbor sample (samples).

About the GLCM and textures

The Gray Level Co-occurrence Matrix1 (GLCM) and associated texture feature calculations are image analysis techniques. Given an image composed of pixels each with an intensity (a specific gray level), the GLCM is a tabulation of how often different combinations of gray levels co-occur in an image or image section. Texture feature calculations use the contents of the GLCM to give a measure of the variation in intensity (a.k.a. image texture) at the pixel of interest.

Echoview offers a GLCM Texture Feature operator that produces a virtual variable which represents a specified texture calculation on a single beam echogram.

Algorithm

The virtual variable is created in the following way (using the settings on the GLCM Texture page of the Variable properties dialog box identified in bold):

  1. Quantize the image data. Each sample on the echogram is treated as a single image pixel and the value of the sample is the intensity of that pixel. These intensities are then further quantized into a specified number of discrete gray levels as specified under Quantization.
  2. Create the GLCM. It will be a square matrix N x N in size where N is the Number of levels specified under Quantization. The matrix is created as follows:
    1. Let s be the sample under consideration for the calculation.
    2. Let W be the set of samples surrounding sample s which fall within a window centered upon sample s of the size specified under Window Size.
    3. Considering only the samples in the set W, define each element i,j of the GLCM as the number of times two samples of intensities i and j occur in specified Spatial relationship (where i and j are intensities between 0 and Number of levels-1) .

      The sum of all the elements i, j of the GLCM will be the total number of times the specified spatial relationship occurs in W.
    4. Make the GLCM symmetric:
      1. Make a transposed copy of the GLCM
      2. Add this copy to the GLCM itself

        This produces a symmetric matrix in which the relationship i to j is indistinguishable for the relationship j to i (for any two intensities i and j). As a consequence the sum of all the elements i, j of the GLCM will now be twice the total number of times the specified spatial relationship occurs in W (once where the sample with intensity i is the reference sample and once where the sample with intensity j is the reference sample), and for any given i, the sum of all the elements i, j with the given i will be the total number of times a sample of intensity i appears in the specified spatial relationship with another sample.
    5. Normalize the GLCM:
      1. Divide each element by the sum of all elements

        The elements of the GLCM may now be considered probabilities of finding the relationship i, j (or j, i) in W.
  3. Calculate the selected Feature. This calculation uses only the values in the GLCM. See:
  4. The sample s in the resulting virtual variable is replaced by the value of this calculated feature.

Texture equations

Energy feature

GLCM Energy equation

Entropy feature

GLCM Entropy equation

Contrast feature

GLCM Contrast equation

Homogeneity feature

GLCM Homogeneity equation

Correlation feature

GLCM Correlation equation

Shade feature

GLCM Shade equation

Prominence feature

GLCM Prominence equation

 

where:

Pij = Element i,j of the normalized symmetrical GLCM
N = Number of gray levels in the image as specified by Number of levels in under Quantization on the GLCM texture page of the Variable Properties dialog box.
μ
= the GLCM mean (being an estimate of the intensity of all pixels in the relationships that contributed to the GLCM), calculated as:

GLCM Mean equation

Note: This also approximates, but is not identical to, the mean of all the pixels in the data window W (as defined by the GLCM algorithm), and it is dependent upon the choice of spatial relationship in that algorithm.

σ 2
= the variance of the intensities of all reference pixels in the relationships that contributed to the GLCM, calculated as:

GLCM Variance equation

Note: This may approximate, but is not identical to, the variance of the intensities of all the pixels in the data window W (as defined by the GLCM algorithm), and it is dependent upon the choice of spatial relationship in that algorithm.

A
= GLCM A equation
C
= The Correlation feature
sgn(x) = Sign of a real number
x = -1 for x < 0
x =  0 for x = 0
x =  1 for x > 0
B
= GLCM B equation

See also

About virtual variables
Operator licensing in Echoview

1. Newcomers to this topic are advised to read the GLCM Tutorial at https://prism.ucalgary.ca/handle/1880/51900 and pursue any further reading if necessary.