Note: This document is for an older version of GRASS GIS that is outdated. You should upgrade, and read the current manual page.

GRASS logo

NAME

r.texture - Generate images with textural features from a raster map.

KEYWORDS

raster, statistics

SYNOPSIS

r.texture
r.texture help
r.texture [-qackviswxedpmno] input=name prefix=string [size=value] [distance=value] [--overwrite] [--verbose] [--quiet]

Flags:

-q
Quiet
-a
Angular Second Moment
-c
Contrast
-k
Correlation
-v
Variance
-i
Inverse Diff Moment
-s
Sum Average
-w
Sum Variance
-x
Sum Entropy
-e
Entropy
-d
Difference Variance
-p
Difference Entropy
-m
Measure of Correlation-1
-n
Measure of Correlation-2
-o
Max Correlation Coeff
--overwrite
Allow output files to overwrite existing files
--verbose
Verbose module output
--quiet
Quiet module output

Parameters:

input=name
Name of input raster map
prefix=string
Prefix for output raster map(s)
size=value
The size of sliding window (odd and >= 3)
Default: 3
distance=value
The distance between two samples (>= 1)
Default: 1

DESCRIPTION

r.texture creates raster maps with textural features from a user-specified raster map layer. The module calculates textural features based on spatial dependence matrices at 0, 45, 90, and 135 degrees for a distance (default = 1).

r.texture assumes grey levels ranging from 0 to 255 as input. The input has to be rescaled to 0 to 255 beforehand if the input map range is outside of this range by using r.rescale.

In general, several variables constitute texture: differences in grey level values, coarseness as scale of grey level differences, presence or lack of directionality and regular patterns. A texture can be characterized by tone (grey level intensity properties) and structure (spatial relationships). Since textures are highly scale dependent, hierarchical textures may occur.

r.texture reads a GRASS raster map as input and calculates textural features based on spatial dependence matrices for north-south, east-west, northwest, and southwest directions using a side by side neighborhood (i.e., a distance of 1). The user should be sure to carefully set the resolution (using g.region) before running this program, or the computer may run out of memory. The output consists into four images for each textural feature, one for every direction.

A commonly used texture model is based on the so-called grey level co-occurrence matrix. This matrix is a two-dimensional histogram of grey levels for a pair of pixels which are separated by a fixed spatial relationship. The matrix approximates the joint probability distribution of a pair of pixels. Several texture measures are directly computed from the grey level co-occurrence matrix.

The following part offers brief explanations of texture measures (after Jensen 1996).

First-order statistics in the spatial domain

Note that measures "mean", "kurtosis", "range", "skewness", and "standard deviation" are available in r.neighbors.

Second-order statistics in the spatial domain

The second-order statistics texture model is based on the so-called grey level co-occurrence matrices (GLCM; after Haralick 1979).

NOTES

Importantly, the input raster map cannot have more than 255 categories. If needed, a map with more categories can be rescaled using r.rescale.

EXAMPLE

Calculation of Angular Second Moment of B/W orthophoto (North Carolina data set):
g.region rast=ortho_2001_t792_1m -p
r.texture -a ortho_2001_t792_1m prefix=ortho_texture

# display
g.region n=221461 s=221094 w=638279 e=638694
d.shadedmap drape=ortho_texture_ASM_0 rel=ortho_2001_t792_1m
This calculates four maps (requested texture at four orientations): ortho_texture_ASM_0, ortho_texture_ASM_45, ortho_texture_ASM_90, ortho_texture_ASM_135.

BUGS

- The program can run incredibly slow for large raster maps.

- The method for finding the maximal correlation coefficient, which requires finding the second largest eigenvalue of a matrix Q, does not always converge. This is a known issue with this measure in general.

REFERENCES

The algorithm was implemented after Haralick et al., 1973 and 1979.

The code was taken by permission from pgmtexture, part of PBMPLUS (Copyright 1991, Jef Poskanser and Texas Agricultural Experiment Station, employer for hire of James Darrell McCauley). Manual page of pgmtexture.

SEE ALSO

i.smap, i.gensigset, i.pca, r.neighbors, r.rescale

AUTHORS

G. Antoniol - RCOST (Research Centre on Software Technology - Viale Traiano - 82100 Benevento)
C. Basco - RCOST (Research Centre on Software Technology - Viale Traiano - 82100 Benevento)
M. Ceccarelli - Facolta di Scienze, Universita del Sannio, Benevento

Last changed: $Date: 2011-11-27 06:07:04 -0800 (Sun, 27 Nov 2011) $


Main index - raster index - Full index

© 2003-2014 GRASS Development Team