GLRL_STATS Function
Performs five statistical calculations on the graylevel run length matrix obtained by a call to the GLRL function.
Usage
result = GLRL_STATS(glrl_matrix, xdim, ydim)
Input Parameters
glrl_matrix—The graylevel run length matrix computed by GLRL.
xdim—The x-dimension, the number of columns in the image from the call to GLRL.
ydim—The y-dimension, the number of rows in the image from the call to GLRL.
Returned Value
result—A five-element double array containing the following GLRL statistics: the short run emphasis, the long run emphasis, the graylevel distribution, the run-length distribution, and the run percentages.
Keywords
None.
Discussion
The first statistic in returned array is the short run emphasis. This is maximum for fine textured graylevel runs. The short run emphasis is given by:
and glrl_matrix is an N-by-M array.
The second statistic returned is the long run emphasis. The long run emphasis is maximum for coarse textured graylevel runs. The long run emphasis is given by:
and glrl_matrix is an N-by-M array.
The third statistic returned is graylevel distribution. Graylevel distribution provides an indication of the number of runs relative to the number of graylevels in the GLRL matrix. The graylevel distribution is given by:
and glrl_matrix is an N-by-M array.
The fourth statistic returned is the run-length distribution. The run-length distribution indicates the occurrence of run-lengths relative to the number of graylevels in the GLRL matrix. The run-length distribution is given by:
and glrl_matrix is an N-by-M array.
The fifth statistic returned is the GLRL run percentages. The run percentages are given by:
and glrl_matrix is an N-by-M array.
Example
; Read a grayscale image.
image = IMAGE_READ(!IP_Data + 'texture.tif')
; Compute the graylevel run length (GLRL).
glrl_array = GLRL(image('pixels'))
; Display the glrl_array.
TVSCL, glrl_array
; Compute the GLRL texture statistics for this image.
glrl_texture = GLRL_STATS(glrl_array, image('width'), $
image('height'))
; Print the texture statistics.
PRINT, glrl_texture
See Also