PV-WAVE Extreme Advantage > Image Processing Toolkit User Guide > Reference A–I > GLCM Function (PV-WAVE Extreme Advantage)
GLCM Function (PV-WAVE Extreme Advantage)
Computes the graylevel co-occurrence probability matrix (GLCM) for a graylevel image.
Usage
result = GLCM(image)
Input Parameters
image—A 2D array containing a graylevel image.
Returned Value
result—A floating-point array of the graylevel co-occurrence probabilities for image.
Keywords
Maxgray—The maximum graylevel in the image to consider. (Default: MAX(image))
Mingray—The minimum graylevel in the image to consider. (Default: MIN(image))
Sums—If set, returns a long array containing the graylevel co-occurrence sums matrix instead of the probabilities.
Xoffset—The pixel position offset in the x-direction. (Default: 1)
 
 
Either Xoffset or Yoffset must be nonzero.
Yoffset—The pixel position offset in the y-direction. (Default: 1)
Discussion
Each element (a, b) of the graylevel co-occurrence matrix is the joint probability that graylevel b is at a distance specified by Xoffset, and Yoffset from graylevel a. Performing statistics on the graylevel co-occurrence probability matrix (GLCM) provides quantitative information about image texture.
Example
; Read a grayscale image.
image = IMAGE_READ(!IP_Data + 'texture.tif')
; Compute the GLCM.
glcm_array = GLCM(image('pixels'))
; Display the glcm_array.
TVSCL, glcm_array
; Compute the GLCM texture statistics for this image.
glcm_texture = GLCM_STATS(glcm_array)
See Also