3
<em>r.texture</em> creates raster maps with textural features from a
4
user-specified raster map layer. The module calculates textural features
5
based on spatial dependence matrices at 0, 45, 90, and 135
6
degrees for a <em>distance</em> (default = 1).
8
<em>r.texture</em> assumes grey levels ranging from 0 to 255 as input.
9
The input is automatically rescaled to 0 to 255 if the input map range is outside
12
In general, several variables constitute texture: differences in grey level values,
13
coarseness as scale of grey level differences, presence or lack of directionality
14
and regular patterns. A texture can be characterized by tone (grey level intensity
15
properties) and structure (spatial relationships). Since textures are highly scale
16
dependent, hierarchical textures may occur.
18
<em>r.texture</em> reads a GRASS raster map as input and calculates textural
19
features based on spatial
20
dependence matrices for north-south, east-west, northwest, and southwest
21
directions using a side by side neighborhood (i.e., a distance of 1). The user
22
should be sure to carefully set the resolution (using <em>g.region</em>) before
23
running this program, or the computer may run out of memory.
24
The output consists into four images for each textural feature, one for every
28
A commonly used texture model is based on the so-called grey level co-occurrence
29
matrix. This matrix is a two-dimensional histogram of grey levels
30
for a pair of pixels which are separated by a fixed spatial relationship.
31
The matrix approximates the joint probability distribution of a pair of pixels.
32
Several texture measures are directly computed from the grey level co-occurrence
35
The following part offers brief explanations of texture measures (after
38
<h3>First-order statistics in the spatial domain</h3>
40
<li> Sum Average (SA)</li>
43
This measure analyses the randomness. It is high when the values of the
44
moving window have similar values. It is low when the values are close
45
to either 0 or 1 (i.e. when the pixels in the local window are uniform).</li>
47
<li> Difference Entropy (DE)</li>
49
<li> Sum Entropy (SE)</li>
52
A measure of gray tone variance within the moving window (second-order
53
moment about the mean)</li>
55
<li> Difference Variance (DV)</li>
57
<li> Sum Variance (SV)</li>
60
Note that measures "mean", "kurtosis", "range", "skewness", and "standard
61
deviation" are available in <em>r.neighbors</em>.
63
<h3>Second-order statistics in the spatial domain</h3>
65
The second-order statistics texture model is based on the so-called grey
66
level co-occurrence matrices (GLCM; after Haralick 1979).
69
<li> Angular Second Moment (ASM, also called Uniformity):
70
This is a measure of local homogeneity and the opposite of Entropy.
71
High values of ASM occur when the pixels in the moving window are
74
Note: The square root of the ASM is sometimes used as a texture measure,
75
and is called Energy.</li>
77
<li> Inverse Difference Moment (IDM, also called Homogeneity):
78
This measure relates inversely to the contrast measure. It is a direct measure of the
79
local homogeneity of a digital image. Low values are associated with low homogeneity
83
This measure analyses the image contrast (locally gray-level variations) as
84
the linear dependency of grey levels of neighboring pixels (similarity). Typically high,
85
when the scale of local texture is larger than the <em>distance</em>.</li>
87
<li> Correlation (COR):
88
This measure analyses the linear dependency of grey levels of neighboring
89
pixels. Typically high, when the scale of local texture is larger than the
90
<em>distance</em>.</li>
92
<li> Information Measures of Correlation (MOC)</li>
94
<li> Maximal Correlation Coefficient (MCC)</li>
99
Importantly, the input raster map cannot have more than 255 categories.
103
Calculation of Angular Second Moment of B/W orthophoto (North Carolina data set):
105
<div class="code"><pre>
106
g.region raster=ortho_2001_t792_1m -p
107
# set grey level color table 0% black 100% white
108
r.colors ortho_2001_t792_1m color=grey
109
# extract grey levels
110
r.mapcalc "ortho_2001_t792_1m.greylevel = ortho_2001_t792_1m"
112
r.texture ortho_2001_t792_1m.greylevel prefix=ortho_texture method=asm -s
114
g.region n=221461 s=221094 w=638279 e=638694
115
d.shade color=ortho_texture_ASM_0 shade=ortho_2001_t792_1m
118
This calculates four maps (requested texture at four orientations):
119
ortho_texture_ASM_0, ortho_texture_ASM_45, ortho_texture_ASM_90, ortho_texture_ASM_135.
122
The program can run incredibly slow for large raster maps.
126
The algorithm was implemented after Haralick et al., 1973 and 1979.
129
The code was taken by permission from <em>pgmtexture</em>, part of
130
PBMPLUS (Copyright 1991, Jef Poskanser and Texas Agricultural Experiment
131
Station, employer for hire of James Darrell McCauley). Manual page
132
of <a href="http://netpbm.sourceforge.net/doc/pgmtexture.html">pgmtexture</a>.
135
<li>Haralick, R.M., K. Shanmugam, and I. Dinstein (1973). Textural features for
136
image classification. <em>IEEE Transactions on Systems, Man, and
137
Cybernetics</em>, SMC-3(6):610-621.</li>
138
<li>Bouman, C. A., Shapiro, M. (1994). A Multiscale Random Field Model for
139
Bayesian Image Segmentation, IEEE Trans. on Image Processing, vol. 3, no. 2.</li>
140
<li>Jensen, J.R. (1996). Introductory digital image processing. Prentice Hall.
141
ISBN 0-13-205840-5 </li>
142
<li>Haralick, R. (May 1979). <i>Statistical and structural approaches to texture</i>,
143
Proceedings of the IEEE, vol. 67, No.5, pp. 786-804</li>
144
<li>Hall-Beyer, M. (2007). <a href="http://www.fp.ucalgary.ca/mhallbey/tutorial.htm">The GLCM Tutorial Home Page</a>
145
(Grey-Level Co-occurrence Matrix texture measurements). University of Calgary, Canada
151
<a href="i.smap.html">i.smap</a>,
152
<a href="i.gensigset.html">i.gensigset</a>,
153
<a href="i.pca.html">i.pca</a>,
154
<a href="r.neighbors.html">r.neighbors</a>,
155
<a href="r.rescale.html">r.rescale</a>
159
<a href="mailto:antoniol@ieee.org">G. Antoniol</a> - RCOST (Research Centre on Software Technology - Viale Traiano - 82100 Benevento)<br>
160
C. Basco - RCOST (Research Centre on Software Technology - Viale Traiano - 82100 Benevento)<br>
161
M. Ceccarelli - Facolta di Scienze, Universita del Sannio, Benevento
163
<p><i>Last changed: $Date: 2014-12-25 15:50:03 +0100 (Thu, 25 Dec 2014) $</i>