1i.class(1)                    Grass User's Manual                   i.class(1)
2
3
4

NAME

6       i.class   -  Generates spectral signatures for an image by allowing the
7       user to outline regions of interest.
8       The resulting signature file can be used as input for i.maxlik or as  a
9       seed signature file for i.cluster.
10

KEYWORDS

12       imagery
13

SYNOPSIS

15       i.class
16       i.class help
17       i.class  map=name  group=name  subgroup=name  outsig=name  [insig=name]
18       [--verbose]  [--quiet]
19
20   Parameters:
21       map=name
22           Name of raster map to be displayed
23
24       group=name
25           Name of input imagery group
26
27       subgroup=name
28           Name of input imagery subgroup
29
30       outsig=name
31           File to contain result signatures
32
33       insig=name
34           File containing input signatures (seed)
35

DESCRIPTION

37       i.class performs the first pass in the GRASS two-pass supervised  image
38       classification  process; the GRASS program i.maxlik executes the second
39       pass.  Both programs must be run to generate a classified map in  GRASS
40       raster format.
41
42       i.class  is  an  interactive  program that allows the user to outline a
43       region on the screen and calculate the spectral signature based on  the
44       cells  that  are within that region.  During this process the user will
45       be shown a histogram of the region for each image band.  The  user  can
46       also  display  the  cells  of the image bands which fall within a user-
47       specified number of standard deviations from the means in the  spectral
48       signature.   By  doing  this, the user can see how much of the image is
49       likely to be put into the class associated with the current signature.
50
51       The spectral signatures that result are composed of  region  means  and
52       covariance  matrices.   These  region means and covariance matrices are
53       used in the second pass (i.maxlik) to classify the image.
54
55       Alternatively, the spectral signatures generated by i.class can be used
56       for seed means for the clusters in the i.cluster program.
57

USER INPUTS

59       At  the  command line the user is asked to enter the name of the raster
60       map to be displayed during the process  of  outlining  regions.   Typi‐
61       cally, the user will want to enter the name of a color composite previ‐
62       ously created by r.composite.  However, the user can enter the name  of
63       any  existing raster map.  This leaves the potential for using a raster
64       map not directly derived from the image as a backdrop on which the user
65       can outline the classes of interest.
66
67       The  first  screen in the program i.class asks the user for the imagery
68       group and subgroup to be analyzed:
69       LOCATION: location    SUPERVISED CLASSIFIER     MAPSET: demo
70            Please select the group and subgroup to be analyzed
71       GROUP:      spot_______   (list will show available groups)
72       SUBGROUP:   123________   (list will show available subgroups)
73            AFTER COMPLETING ALL ANSWERS, HIT <ESC> TO CONTINUE
74                          (OR <Ctrl-C> TO CANCEL)
75
76
77       The group should contain the imagery bands  that  the  user  wishes  to
78       classify.   The subgroup is a subset of this group.  The user must cre‐
79       ate a group and a subgroup by running the GRASS program i.group  before
80       running i.class.  The subgroup should contain only the image bands that
81       the user wishes to classify.  Note that this subgroup must contain more
82       than one band.
83
84       After  the  first screen, the program asks the user for the name of the
85       resulting signature file.  The signature file is both the  output  file
86       for i.class and the required input file for the GRASS program i.maxlik.
87       It contains the region means and covariance matrices that are  used  to
88       classify an image in i.maxlik.
89
90       After  entering the resulting signature file name, the user is asked to
91       enter the name of a seed signature file.  This is optional.   A  "seed"
92       signature  file  is  a  previously created signature file.  Such a seed
93       signature file may be the result of an earlier  run  of  i.class.   The
94       seed  signature  file  is  copied into the new resulting signature file
95       before any new signatures are added by i.class.  In this way,  you  can
96       collect  the work from several sessions with i.class into one signature
97       file.
98
99       At this point the i.class graphics screen will be drawn on the graphics
100       monitor  and  the  user  will  be directed to use the mouse.  From this
101       point on the user will primarily work with the mouse, selecting options
102       from the menus and outlining regions on the screen.  The only time that
103       the user will need to return to the text terminal is to enter names for
104       the signatures created.
105

THE DISPLAY FRAMES

107       The  display  frame  layout  that i.class uses is represented below for
108       reference.
109       +-----------------------+---------------------------+
110       |                       |                           |
111       |                       |    Map Display Frame      |
112       |                       |                           |
113       |                       |                           |
114       |   Histogram Display   |                           |
115       |        Frame          |                           |
116       |                       |                           |
117       |                       |                           |
118       |                       |                           |
119       |                       +---------------------------+
120       |                       |                           |
121       |                       |    Zoom Display Frame     |
122       |                       |                           |
123       |                       |                           |
124       |                       |                           |
125       |                       |                           |
126       |                       |                           |
127       |                       |                           |
128       +-----------------------+---------------------------+
129       |        Menu Frame                                 |
130       +---------------------------------------------------+
131
132

THE MENUS

134       All of the menus in the i.class program are displayed across the bottom
135       of  the  graphics  monitor in the Menu Frame.  To select an option from
136       one of these menus, simply place the cursor  over  your  selection  and
137       press  any  button on the mouse.  Each of the menus is discussed in the
138       following paragraphs.
139
140   The Command Menu
141       The Command Menu includes the following selections:
142
143       Zoom
144              This command allows the user to outline a rectangular region  in
145              either  the  Map  or  Zoom Display Frames and the region is dis‐
146              played, magnified, to fit in the Zoom Display Frame.  A red rec‐
147              tangle  is  drawn in the Map Display Frame, indicating what area
148              the Zoom Display Frame shows.
149
150       To outline the rectangular region simply use any mouse button to anchor
151       the  first  corner  of the border and then use any button to choose the
152       other corner.
153
154       Define region
155              This selection takes the user to the  Region  Menu.   This  menu
156              includes  the options that allow the user to outline a region of
157              interest on the displayed raster map.
158
159       Redisplay map
160              This selection takes the user to the Redisplay Menu.  The Redis‐
161              play Menu allows the user to redraw map display frames.
162
163       Analyze region
164              This  selection  starts  the  process of analyzing the currently
165              defined region.  A histogram of the defined region will be  dis‐
166              played for each band.  On the histogram for each band, the mean,
167              standard deviation, minimum cell value and  maximum  cell  value
168              are  marked.   The  histograms  are  automatically  scaled in an
169              attempt to fit the data into the space available, but it is pos‐
170              sible  that all of the data will not fit.  In this case, as much
171              of the data as possible, centered around the mean, will be  dis‐
172              played.   After  the  histograms are displayed, the user will be
173              given the Signature Menu.
174
175       Quit
176              The user should make this selection  to  end  the  session  with
177              i.class.
178
179   The Region Menu
180       The Region Menu contains the following selections:
181
182       Erase region
183              This selection erases any currently defined region.
184
185       Draw region
186              This selection allows the user to use the mouse to draw a region
187              on either the Map or Zoom  Display  Frame.   An  explanation  of
188              which  mouse buttons to use is displayed in the Menu Frame.  The
189              user does not need to try to complete the region boundary.   The
190              last  line of the region will be added when the user selects the
191              Complete region option on the Region Menu.
192
193       Restore last region
194              This selection restores the last region that was drawn.  After a
195              region  is  completed,  it  will  be saved to be restored later.
196              Only one previous region is saved.
197
198       Complete region
199              This selection completes the  region  that  is  currently  being
200              drawn.   As  noted  above,  it  saves  the complete region to be
201              restored later, if needed.  Once the user has  made  a  complete
202              region,  it can be analyzed with the Analyze Region selection on
203              the Command Menu.
204
205       Done
206              Use this selection to return to the Command Menu.
207
208   The Redisplay Map Menu
209       The Redisplay Map Menu has the following selections, which  are  useful
210       to redraw the raster maps displayed in the Map and Zoom Display Frames.
211
212       Map geographic region
213              This selection causes the raster map in the Map Display Frame to
214              be redrawn.
215
216       Zoom region
217              This selection causes the Zoom Display Frame to be redrawn.
218
219       Both
220              This selection causes both the Map and Zoom Display Frames to be
221              redrawn.
222
223       Cancel
224              Use this selection if you do not want to redisplay either of the
225              above regions.  The user will be returned to the Command Menu.
226
227   The Analyze Region Menu
228       The Analyze Region Menu contains the Signature Menu, which  allows  the
229       user  to  set  the number of standard deviations and the display color,
230       and then to display (as an overlay) the cells that match the  signature
231       within the number of standard deviations specified.  Note that once the
232       matching cells are displayed, the Map Display Frame must be redisplayed
233       to  see  only  the original raster map again.  The following selections
234       are available on the Signature Menu:
235
236       Set std dev's
237              This selection allows the user to set  the  number  of  standard
238              deviations from the mean for the maximum and minimum range.  The
239              maximum and minimum range is used when finding  the  cells  that
240              "match"  the  signature.   The  user is presented with a menu of
241              typical choices and an "Other" option.  If the "Other" option is
242              selected,  enter the number of standard deviations from the key‐
243              board on the text terminal.  Otherwise, the selected option will
244              be  used.   When  the  number of standard deviations is set, the
245              histograms for each band will be redrawn with  the  maximum  and
246              minimum range marked.
247
248       Note  that  the  number in parentheses on this selection is the current
249       number of standard deviations.
250
251       Set color
252              This selection allows the user to set the color for the  display
253              of  cells  that "match" the current signature.  The user is pre‐
254              sented with a menu of color choices.  The color selected will be
255              used when the Display Matches Menu selection is made.
256
257       Note  that  the  color  in parentheses on this selection is the current
258       color for display.
259
260       Display matches
261              This selection displays the cells that "match" the current  sig‐
262              nature  in the current color.  A cell "matches" the current sig‐
263              nature if the cell value in each band  is  between  the  minimum
264              range  and  maximum range for that band defined by the number of
265              standard deviations currently set.
266
267       Done
268              When this selection is chosen, the user will be asked whether or
269              not  he/she  would  like  to save the current signature.  If the
270              user answers with the "Yes" selection, he/she will be  asked  to
271              enter a description for the resultant signature file on the text
272              terminal keyboard.  The saved signature file description will be
273              used  by  i.maxlik to name the category that is created from the
274              current signature.  After either a "No" answer or the  signature
275              description  is  entered,  the  user  is returned to the Command
276              Menu.
277

NOTES

279       i.class uses the current MASK to generate the overlay  for  cells  that
280       match  a  signature.   As a result, if a MASK already exists it will be
281       removed during the execution of this program.
282
283       The cell values in the image bands cannot fall outside of the range  of
284       0 to 255.  i.class will report an error if they do.
285
286       i.class,  like  some  of  the  other imagery programs, does not use the
287       standard GRASS display frames.  After running i.class, you will need to
288       create  a display frame (e.g., using d.frame or d.erase) before you can
289       use most of the GRASS display (d.) commands.
290
291       i.group must be run before i.class to create an  imagery  group  and  a
292       subgroup containing the image bands to be classified.
293
294       The  user  can  perform  a  supervised  image classification by running
295       i.class followed by i.maxlik.  The user  can  perform  an  unsupervised
296       classification by running i.cluster followed by i.maxlik.
297
298       i.class  is  interactive and requires the user to be running a graphics
299       display monitor (see d.mon) to run this program.
300

SEE ALSO

302       The GRASS 4 Image Processing manual
303
304       d.frame,  d.mon,  g.region,  i.cca,  i.cluster,  r.composite,  i.group,
305       i.maxlik, r.mapcalc
306

AUTHOR

308       David Satnik, Central Washington University
309
310       Last changed: $Date: 2007-06-14 14:18:14 +0200 (Thu, 14 Jun 2007) $
311
312       Full index
313
314       © 2003-2008 GRASS Development Team
315
316
317
318GRASS 6.3.0                                                         i.class(1)
Impressum