~ubuntu-branches/ubuntu/vivid/grass/vivid-proposed

« back to all changes in this revision

Viewing changes to raster/r.texture/r.texture.html

  • Committer: Package Import Robot
  • Author(s): Bas Couwenberg
  • Date: 2015-02-20 23:12:08 UTC
  • mfrom: (8.2.6 experimental)
  • Revision ID: package-import@ubuntu.com-20150220231208-1u6qvqm84v430b10
Tags: 7.0.0-1~exp1
* New upstream release.
* Update python-ctypes-ternary.patch to use if/else instead of and/or.
* Drop check4dev patch, rely on upstream check.
* Add build dependency on libpq-dev to grass-dev for libpq-fe.h.
* Drop patches applied upstream, refresh remaining patches.
* Update symlinks for images switched from jpg to png.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<h2>DESCRIPTION</h2>
 
2
 
 
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).
 
7
<p>
 
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
 
10
of this range.
 
11
<p>
 
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.
 
17
<p>
 
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
 
25
direction.
 
26
 
 
27
<p>
 
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
 
33
matrix. 
 
34
<p>
 
35
The following part offers brief explanations of texture measures (after
 
36
Jensen 1996).
 
37
 
 
38
<h3>First-order statistics in the spatial domain</h3>
 
39
<ul>
 
40
<li> Sum Average (SA)</li>
 
41
 
 
42
<li> Entropy (ENT):
 
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>
 
46
 
 
47
<li> Difference Entropy (DE)</li>
 
48
 
 
49
<li> Sum Entropy (SE)</li>
 
50
 
 
51
<li> Variance (VAR):
 
52
  A measure of gray tone variance within the moving window (second-order
 
53
moment about the mean)</li>
 
54
 
 
55
<li> Difference Variance (DV)</li>
 
56
 
 
57
<li> Sum Variance (SV)</li>
 
58
</ul>
 
59
 
 
60
Note that measures "mean", "kurtosis", "range", "skewness", and "standard
 
61
deviation" are available in <em>r.neighbors</em>.
 
62
 
 
63
<h3>Second-order statistics in the spatial domain</h3>
 
64
 
 
65
The second-order statistics texture model is based on the so-called grey
 
66
level co-occurrence matrices (GLCM; after Haralick 1979).
 
67
 
 
68
<ul>
 
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
 
72
 very similar.
 
73
 <br>
 
74
 Note: The square root of the ASM is sometimes used as a texture measure,
 
75
 and is called Energy.</li>
 
76
 
 
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
 
80
 and vice versa.</li>
 
81
 
 
82
<li> Contrast (CON):
 
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>
 
86
 
 
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>
 
91
 
 
92
<li> Information Measures of Correlation (MOC)</li>
 
93
 
 
94
<li> Maximal Correlation Coefficient (MCC)</li>
 
95
</ul>
 
96
   
 
97
<h2>NOTES</h2>
 
98
 
 
99
Importantly, the input raster map cannot have more than 255 categories.
 
100
 
 
101
<h2>EXAMPLE</h2>
 
102
 
 
103
Calculation of Angular Second Moment of B/W orthophoto (North Carolina data set):
 
104
 
 
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"
 
111
# texture analysis
 
112
r.texture ortho_2001_t792_1m.greylevel prefix=ortho_texture method=asm -s 
 
113
# display
 
114
g.region n=221461 s=221094 w=638279 e=638694
 
115
d.shade color=ortho_texture_ASM_0 shade=ortho_2001_t792_1m
 
116
</pre></div>
 
117
 
 
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.
 
120
 
 
121
<h2>BUGS</h2>
 
122
The program can run incredibly slow for large raster maps.
 
123
 
 
124
<h2>REFERENCES</h2>
 
125
 
 
126
The algorithm was implemented after Haralick et al., 1973 and 1979.
 
127
 
 
128
<p>
 
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>.
 
133
 
 
134
<ul> 
 
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
 
146
</ul>
 
147
 
 
148
<h2>SEE ALSO</h2>
 
149
 
 
150
<em>
 
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>
 
156
</em>
 
157
 
 
158
<h2>AUTHORS</h2>
 
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
 
162
 
 
163
<p><i>Last changed: $Date: 2014-12-25 15:50:03 +0100 (Thu, 25 Dec 2014) $</i>