1i.cluster(1) Grass User's Manual i.cluster(1)
2
3
4
6 i.cluster - Generates spectral signatures for land cover types in an
7 image using a clustering algorithm.
8 The resulting signature file is used as input for i.maxlik, to generate
9 an unsupervised image classification.
10
12 imagery
13
15 i.cluster
16 i.cluster help
17 i.cluster [-q] group=name subgroup=string sigfile=name classes=integer
18 [seed=name] [sample=row_interval,col_interval] [iterations=integer]
19 [convergence=float] [separation=float] [min_size=integer]
20 [reportfile=name] [--verbose] [--quiet]
21
22 Flags:
23 -q
24 Quiet
25
26 --verbose
27 Verbose module output
28
29 --quiet
30 Quiet module output
31
32 Parameters:
33 group=name
34 Group of imagery files to be clustered
35
36 subgroup=string
37 Subgroup name in the above group
38
39 sigfile=name
40 File to contain result signatures
41
42 classes=integer
43 Initial number of classes
44 Options: 1-255
45
46 seed=name
47 File containing initial signatures
48
49 sample=row_interval,col_interval
50 Sampling intervals (by row and col); default: ~10,000 pixels
51
52 iterations=integer
53 Maximum number of iterations
54 Default: 30
55
56 convergence=float
57 Percent convergence
58 Options: 0-100
59 Default: 98.0
60
61 separation=float
62 Cluster separation
63 Default: 0.0
64
65 min_size=integer
66 Minimum number of pixels in a class
67 Default: 17
68
69 reportfile=name
70 Output file to contain final report
71
73 i.cluster performs the first pass in the GRASS two-pass unsupervised
74 classification of imagery, while the GRASS program i.maxlik executes
75 the second pass. Both programs must be run to complete the unsupervised
76 classification.
77
78 i.cluster is a clustering algorithm that reads through the (raster)
79 imagery data and builds pixel clusters based on the spectral
80 reflectances of the pixels. The pixel clusters are imagery categories
81 that can be related to land cover types on the ground. The spectral
82 distributions of the clusters (which will be the land cover spectral
83 signatures) are influenced by six parameters set by the user. The
84 first parameter set by the user is the initial number of clusters to be
85 discriminated. i.cluster starts by generating spectral signatures for
86 this number of clusters and "attempts" to end up with this number of
87 clusters during the clustering process. The resulting number of clus‐
88 ters and their spectral distributions, however, are also influenced by
89 the range of the spectral values (category values) in the image files
90 and the other parameters set by the user. These parameters are: the
91 minimum cluster size, minimum cluster separation, the percent conver‐
92 gence, the maximum number of iterations, and the row and column sam‐
93 pling intervals.
94
95 The cluster spectral signatures that result are composed of cluster
96 means and covariance matrices. These cluster means and covariance
97 matrices are used in the second pass (i.maxlik) to classify the image.
98 The clusters or spectral classes result can be related to land cover
99 types on the ground. The user has to specify the name of group file,
100 the name of subgroup file, the name of a file to contain result signa‐
101 tures, the initial number of clusters to be discriminated, and option‐
102 ally other parameters (see below) where the group should contain the
103 imagery files that the user wishes to classify. The subgroup is a sub‐
104 set of this group. The user must create a group and subgroup by run‐
105 ning the GRASS program i.group before running i.cluster. The subgroup
106 should contain only the imagery band files that the user wishes to
107 classify. Note that this subgroup must contain more than one band
108 file. The purpose of the group and subgroup is to collect map layers
109 for classification or analysis. The sigfile is the file to contain
110 result signatures which can be used as input for i.maxlik. The classes
111 value is the initial number of clusters to be discriminated; any param‐
112 eter values left unspecified are set to their default values.
113
114 Flags:
115 -q
116 Run quietly. Suppresses output of program percent-complete mes‐
117 sages and the time elapsed from the beginning of the program. If
118 this flag is not used, these messages are printed out.
119
120 Parameters:
121 group=name
122 The name of the group file which contains the imagery files that
123 the user wishes to classify.
124
125 subgroup=name
126 The name of the subset of the group specified in group option,
127 which must contain only imagery band files and more than one
128 band file. The user must create a group and a subgroup by run‐
129 ning the GRASS program i.group before running i.cluster.
130
131 sigfile=name
132 The name assigned to output signature file which contains signa‐
133 tures of classes and can be used as the input file for the GRASS
134 program i.maxlik for an unsupervised classification.
135
136 classes=value
137 The number of clusters that will initially be identified in the
138 clustering process before the iterations begin.
139
140 seed=name
141 The name of a seed signature file is optional. The seed signa‐
142 tures are signatures that contain cluster means and covariance
143 matrices which were calculated prior to the current run of
144 i.cluster. They may be acquired from a previously run of i.clus‐
145 ter or from a supervised classification signature training site
146 section (e.g., using the signature file output by i.class). The
147 purpose of seed signatures is to optimize the cluster decision
148 boundaries (means) for the number of clusters specified.
149
150 sample=row_interval,col_interval
151 These numbers are optional with default values based on the size
152 of the data set such that the total pixels to be processed is
153 approximately 10,000 (consider round up).
154
155 iterations=value
156 This parameter determines the maximum number of iterations which
157 is greater than the number of iterations predicted to achieve
158 the optimum percent convergence. The default value is 30. If the
159 number of iterations reaches the maximum designated by the user;
160 the user may want to rerun i.cluster with a higher number of
161 iterations (see reportfile).
162 Default: 30
163
164 convergence=value
165 A high percent convergence is the point at which cluster means
166 become stable during the iteration process. The default value
167 is 98.0 percent. When clusters are being created, their means
168 constantly change as pixels are assigned to them and the means
169 are recalculated to include the new pixel. After all clusters
170 have been created, i.cluster begins iterations that change clus‐
171 ter means by maximizing the distances between them. As these
172 means shift, a higher and higher convergence is approached.
173 Because means will never become totally static, a percent con‐
174 vergence and a maximum number of iterations are supplied to stop
175 the iterative process. The percent convergence should be
176 reached before the maximum number of iterations. If the maximum
177 number of iterations is reached, it is probable that the desired
178 percent convergence was not reached. The number of iterations is
179 reported in the cluster statistics in the report file (see
180 reportfile).
181 Default: 98.0
182
183 separation=value
184 This is the minimum separation below which clusters will be
185 merged in the iteration process. The default value is 0.0. This
186 is an image-specific number (a "magic" number) that depends on
187 the image data being classified and the number of final clusters
188 that are acceptable. Its determination requires experimentation.
189 Note that as the minimum class (or cluster) separation is
190 increased, the maximum number of iterations should also be
191 increased to achieve this separation with a high percentage of
192 convergence (see convergence).
193 Default: 0.0
194
195 min_size=value
196 This is the minimum number of pixels that will be used to define
197 a cluster, and is therefore the minimum number of pixels for
198 which means and covariance matrices will be calculated.
199 Default: 17
200
201 reportfile=name
202 The reportfile is an optional parameter which contains the
203 result, i.e., the statistics for each cluster. Also included are
204 the resulting percent convergence for the clusters, the number
205 of iterations that was required to achieve the convergence, and
206 the separability matrix.
207
209 Running in command line mode, i.cluster will overwrite the output sig‐
210 nature file and reportfile (if required by the user) without prompting
211 if the files existed.
212
214 The GRASS 4 Image Processing manual
215
216 i.class
217 i.group
218 i.gensig
219 i.maxlik
220
222 Michael Shapiro, U.S.Army Construction Engineering Research Laboratory
223 Tao Wen, University of Illinois at Urbana-Champaign, Illinois
224
225 Last changed: $Date: 2007-06-14 14:18:14 +0200 (Thu, 14 Jun 2007) $
226
227 Full index
228
229 © 2003-2008 GRASS Development Team
230
231
232
233GRASS 6.3.0 i.cluster(1)