.TH i.class 1grass "" "GRASS 6.4.4" "Grass User's Manual" .SH NAME \fI\fBi.class\fR\fR - Generates spectral signatures for an image by allowing the user to outline regions of interest. .br The resulting signature file can be used as input for i.maxlik or as a seed signature file for i.cluster. .SH KEYWORDS imagery, classification .SH SYNOPSIS \fBi.class\fR .br \fBi.class help\fR .br \fBi.class map\fR=\fIname\fR \fBgroup\fR=\fIname\fR \fBsubgroup\fR=\fIname\fR \fBoutsig\fR=\fIname\fR [\fBinsig\fR=\fIname\fR] [\-\-\fBverbose\fR] [\-\-\fBquiet\fR] .SS Parameters: .IP "\fBmap\fR=\fIname\fR" 4m .br Name of raster map to be displayed .IP "\fBgroup\fR=\fIname\fR" 4m .br Name of input imagery group .IP "\fBsubgroup\fR=\fIname\fR" 4m .br Name of input imagery subgroup .IP "\fBoutsig\fR=\fIname\fR" 4m .br File to contain result signatures .IP "\fBinsig\fR=\fIname\fR" 4m .br File containing input signatures (seed) .PP .SH DESCRIPTION \fIi.class\fR performs the first pass in the GRASS two-pass supervised image classification process; the GRASS program \fIi.maxlik\fR executes the second pass. Both programs must be run to generate a classified map in GRASS raster format. .PP \fIi.class\fR is an interactive program that allows the user to outline a region on the screen and calculate the spectral signature based on the cells that are within that region. During this process the user will be shown a histogram of the region for each image band. The user can also display the cells of the image bands which fall within a user-specified number of standard deviations from the means in the spectral signature. By doing this, the user can see how much of the image is likely to be put into the class associated with the current signature. .PP The spectral signatures that result are composed of region means and covariance matrices. These region means and covariance matrices are used in the second pass (\fIi.maxlik\fR) to classify the image. .PP Alternatively, the spectral signatures generated by \fIi.class\fR can be used for seed means for the clusters in the \fIi.cluster\fR program. .SH USER INPUTS At the command line the user is asked to enter the name of the raster map to be displayed during the process of outlining regions. Typically, the user will want to enter the name of a color composite previously created by \fIr.composite\fR. However, the user can enter the name of any existing raster map. This leaves the potential for using a raster map not directly derived from the image as a backdrop on which the user can outline the classes of interest. .PP The first screen in the program \fIi.class\fR asks the user for the imagery \fIgroup\fR and \fIsubgroup\fR to be analyzed: \fC .DS .br LOCATION: location SUPERVISED CLASSIFIER MAPSET: demo .br .br Please select the group and subgroup to be analyzed .br .br GROUP: spot_______ (list will show available groups) .br SUBGROUP: 123________ (list will show available subgroups) .br .br .br AFTER COMPLETING ALL ANSWERS, HIT TO CONTINUE .br (OR TO CANCEL) .br .DE \fR .PP The \fIgroup\fR should contain the imagery bands that the user wishes to classify. The \fIsubgroup\fR is a subset of this group. The user must create a group and a subgroup by running the GRASS program \fIi.group\fR before running \fIi.class\fR. The subgroup should contain only the image bands that the user wishes to classify. Note that this subgroup must contain more than one band. .PP After the first screen, the program asks the user for the name of the resulting signature file. The signature file is both the output file for \fIi.class\fR and the required input file for the GRASS \fIi.maxlik\fR module. It contains the region means and covariance matrices that are used to classify an image in \fIi.maxlik\fR. The signature file will be saved in the $MAPSET/group/$GROUP/subgroup/$SUBGROUP/sig/ directory. .PP After entering the resulting signature file name, the user is asked to enter the name of a seed signature file. This is optional. A "seed" signature file is a previously created signature file. Such a seed signature file may be the result of an earlier run of \fIi.class\fR. The seed signature file is copied into the new resulting signature file before any new signatures are added by \fIi.class\fR. In this way, you can collect the work from several sessions with \fIi.class\fR into one signature file. .PP At this point the \fIi.class\fR graphics screen will be drawn on the graphics monitor and the user will be directed to use the mouse. From this point on the user will primarily work with the mouse, selecting options from the menus and outlining regions on the screen. The only time that the user will need to return to the text terminal is to enter names for the signatures created. .SH THE DISPLAY FRAMES The display frame layout that \fIi.class\fR uses is represented below for reference. \fC .DS .br +-----------------------+---------------------------+ .br | | | .br | | Map Display Frame | .br | | | .br | | | .br | Histogram Display | | .br | Frame | | .br | | | .br | | | .br | | | .br | +---------------------------+ .br | | | .br | | Zoom Display Frame | .br | | | .br | | | .br | | | .br | | | .br | | | .br | | | .br +-----------------------+---------------------------+ .br | Menu Frame | .br +---------------------------------------------------+ .br .DE \fR .SH THE MENUS All of the menus in the \fIi.class\fR program are displayed across the bottom of the graphics monitor in the Menu Frame. To select an option from one of these menus, simply place the cursor over your selection and press any button on the mouse. Each of the menus is discussed in the following paragraphs. .SS The Command Menu The Command Menu includes the following selections: .IP "\fIZoom\fR .br This command allows the user to outline a rectangular region in either the Map or Zoom Display Frames and the region is displayed, magnified, to fit in the Zoom Display Frame. A red rectangle is drawn in the Map Display Frame, indicating what area the Zoom Display Frame shows. .PP To outline the rectangular region simply use any mouse button to anchor the first corner of the border and then use any button to choose the other corner. .IP "\fIDefine region\fR .br This selection takes the user to the Region Menu. This menu includes the options that allow the user to outline a region of interest on the displayed raster map. .IP "\fIRedisplay map\fR .br This selection takes the user to the Redisplay Menu. The Redisplay Menu allows the user to redraw map display frames. .IP "\fIAnalyze region\fR .br This selection starts the process of analyzing the currently defined region. A histogram of the defined region will be displayed for each band. On the histogram for each band, the mean, standard deviation, minimum cell value and maximum cell value are marked. The histograms are automatically scaled in an attempt to fit the data into the space available, but it is possible that all of the data will not fit. In this case, as much of the data as possible, centered around the mean, will be displayed. After the histograms are displayed, the user will be given the Signature Menu. .IP "\fIQuit\fR .br The user should make this selection to end the session with \fIi.class\fR. .PP .SS The Region Menu The Region Menu contains the following selections: .IP "\fIErase region\fR .br This selection erases any currently defined region. .IP "\fIDraw region\fR .br This selection allows the user to use the mouse to draw a region on either the Map or Zoom Display Frame. An explanation of which mouse buttons to use is displayed in the Menu Frame. The user does not need to try to complete the region boundary. The last line of the region will be added when the user selects the Complete region option on the Region Menu. .IP "\fIRestore last region\fR .br This selection restores the last region that was drawn. After a region is completed, it will be saved to be restored later. Only one previous region is saved. .IP "\fIComplete region\fR .br This selection completes the region that is currently being drawn. As noted above, it saves the complete region to be restored later, if needed. Once the user has made a complete region, it can be analyzed with the Analyze Region selection on the Command Menu. .IP "\fIDone\fR .br Use this selection to return to the Command Menu. .PP .SS The Redisplay Map Menu The Redisplay Map Menu has the following selections, which are useful to redraw the raster maps displayed in the Map and Zoom Display Frames. .IP "\fIMap geographic region\fR .br This selection causes the raster map in the Map Display Frame to be redrawn. .IP "\fIZoom region\fR .br This selection causes the Zoom Display Frame to be redrawn. .IP "\fIBoth\fR .br This selection causes both the Map and Zoom Display Frames to be redrawn. .IP "\fICancel\fR .br Use this selection if you do not want to redisplay either of the above regions. The user will be returned to the Command Menu. .PP .SS The Analyze Region Menu The Analyze Region Menu contains the Signature Menu, which allows the user to set the number of standard deviations and the display color, and then to display (as an overlay) the cells that match the signature within the number of standard deviations specified. Note that once the matching cells are displayed, the Map Display Frame must be redisplayed to see only the original raster map again. The following selections are available on the Signature Menu: .IP "\fISet std dev's\fR .br This selection allows the user to set the number of standard deviations from the mean for the maximum and minimum range. The maximum and minimum range is used when finding the cells that "match" the signature. The user is presented with a menu of typical choices and an "Other" option. If the "Other" option is selected, enter the number of standard deviations from the keyboard on the text terminal. Otherwise, the selected option will be used. When the number of standard deviations is set, the histograms for each band will be redrawn with the maximum and minimum range marked. .PP Note that the number in parentheses on this selection is the current number of standard deviations. .IP "\fISet color\fR .br This selection allows the user to set the color for the display of cells that "match" the current signature. The user is presented with a menu of color choices. The color selected will be used when the Display Matches Menu selection is made. .PP Note that the color in parentheses on this selection is the current color for display. .IP "\fIDisplay matches\fR .br This selection displays the cells that "match" the current signature in the current color. A cell "matches" the current signature if the cell value in each band is between the minimum range and maximum range for that band defined by the number of standard deviations currently set. .IP "\fIDone\fR .br When this selection is chosen, the user will be asked whether or not he/she would like to save the current signature. If the user answers with the "Yes" selection, he/she will be asked to enter a description for the resultant signature file on the text terminal keyboard. The saved signature file description will be used by \fI i.maxlik\fR to name the category that is created from the current signature. After either a "No" answer or the signature description is entered, the user is returned to the Command Menu. .PP .SH NOTES \fIi.class\fR uses the current MASK to generate the overlay for cells that match a signature. As a result, if a MASK already exists it will be removed during the execution of this program. .PP The cell values in the image bands cannot fall outside of the range of 0 to 255. \fIi.class\fR will report an error if they do. .PP \fIi.class\fR, like some of the other imagery programs, does not use the standard GRASS display frames. After running \fIi.class\fR, you will need to create a display frame (e.g., using \fId.frame\fR or \fId.erase\fR) before you can use most of the GRASS display (d.) commands. .PP \fIi.group\fR must be run before \fIi.class\fR to create an imagery group and a subgroup containing the image bands to be classified. .PP The user can perform a supervised image classification by running \fIi.class\fR followed by \fIi.maxlik\fR. The user can perform an unsupervised classification by running \fIi.cluster\fR followed by \fIi.maxlik\fR. .PP \fIi.class\fR is interactive and requires the user to be running a graphics display monitor (see \fId.mon\fR) to run this program. .SH SEE ALSO The GRASS 4 \fI Image Processing manual\fR .PP \fId.frame, d.mon, g.region, i.cca, i.cluster, r.composite, i.group, i.maxlik, r.mapcalc\fR .SH AUTHOR David Satnik, Central Washington University .PP \fILast changed: $Date: 2011-11-08 12:29:50 +0100 (Tue, 08 Nov 2011) $\fR .PP Full index .PP © 2003-2014 GRASS Development Team