i.class(1)		      Grass User's Manual		    i.class(1)



NNAAMMEE
       ii..ccllaassss	 -  An imagery function that generates spectral signatures for
       an image by allowing the user to  outline  regions  of  interest.   The
       resulting signature file can be used as input for _i_._m_a_x_l_i_k or as a seed
       signature file for _i_._c_l_u_s_t_e_r.
       _(_G_R_A_S_S _I_m_a_g_e _P_r_o_c_e_s_s_i_n_g _P_r_o_g_r_a_m_)

SSYYNNOOPPSSIISS
       ii..ccllaassss

DDEESSCCRRIIPPTTIIOONN
       _i_._c_l_a_s_s performs the first pass in the GRASS two-pass supervised  image
       classification  process; the GRASS program _i_._m_a_x_l_i_k executes the second
       pass.  Both programs must be run to generate a classified map in  GRASS
       raster format.


       _i_._c_l_a_s_s	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.


       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 (_i_._m_a_x_l_i_k) to classify the image.


       Alternatively, the spectral signatures generated by _i_._c_l_a_s_s can be used
       for seed means for the clusters in the _i_._c_l_u_s_t_e_r program.

UUSSEERR IINNPPUUTTSS
       The first screen in the program _i_._c_l_a_s_s asks the user for  the  imagery
       _g_r_o_u_p and _s_u_b_g_r_o_u_p to be analyzed:
       LOCATION: location    SUPERVISED CLASSIFIER     MAPSET: demo

	    Please select the group and subgroup to be analyzed

       GROUP:	   spot_______	 (list will show available groups)
       SUBGROUP:   123________	 (list will show available subgroups)


	    AFTER COMPLETING ALL ANSWERS, HIT <ESC> TO CONTINUE
			  (OR <Ctrl-C> TO CANCEL)



       The  _g_r_o_u_p  should  contain  the  imagery bands that the user wishes to
       classify.  The _s_u_b_g_r_o_u_p is a subset of this group.  The user must  cre-
       ate  a group and a subgroup by running the GRASS program _i_._g_r_o_u_p before
       running _i_._c_l_a_s_s.  The subgroup should contain only the image bands that
       the user wishes to classify.  Note that this subgroup must contain more
       than one band.


       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 _i_._c_l_a_s_s and the required input file for the GRASS program _i_._m_a_x_l_i_k.
       It  contains  the region means and covariance matrices that are used to
       classify an image in _i_._m_a_x_l_i_k.


       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 _i_._c_l_a_s_s.  The
       seed signature file is copied into the  new  resulting  signature  file
       before  any  new signatures are added by _i_._c_l_a_s_s.  In this way, you can
       collect the work from several sessions with _i_._c_l_a_s_s into one  signature
       file.


       Next,  the user is asked to enter the name of the raster map to be dis-
       played during the process of outlining regions.	 Typically,  the  user
       will  want to enter the name of a color composite previously created by
       _i_._c_o_m_p_o_s_i_t_e.  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.


       At this point the _i_._c_l_a_s_s 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.

TTHHEE DDIISSPPLLAAYY FFRRAAMMEESS
       The display frame layout that _i_._c_l_a_s_s uses  is  represented  below  for
       reference.
       +-----------------------+---------------------------+
       |		       |			   |
       |		       |    Map Display Frame	   |
       |		       |			   |
       |		       |			   |
       |   Histogram Display   |			   |
       |	Frame	       |			   |
       |		       |			   |
       |		       |			   |
       |		       |			   |
       |		       +---------------------------+
       |		       |			   |
       |		       |    Zoom Display Frame	   |
       |		       |			   |
       |		       |			   |
       |		       |			   |
       |		       |			   |
       |		       |			   |
       |		       |			   |
       +-----------------------+---------------------------+
       |	Menu Frame				   |
       +---------------------------------------------------+


TTHHEE MMEENNUUSS
       All of the menus in the _i_._c_l_a_s_s 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.

   TThhee CCoommmmaanndd MMeennuu
       The Command Menu includes the following selections:

       _Z_o_o_m   This  command allows the user to outline a rectangular region in
	      either the Map or Zoom Display Frames and  the  region  is  dis-
	      played, magnified, to fit in the Zoom Display Frame.  A red rec-
	      tangle is drawn in the Map Display Frame, indicating  what  area
	      the Zoom Display Frame shows.


       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.

       _D_e_f_i_n_e _r_e_g_i_o_n
	      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.

       _R_e_d_i_s_p_l_a_y _m_a_p
	      This selection takes the user to the Redisplay Menu.  The Redis-
	      play Menu allows the user to redraw map display frames.

       _A_n_a_l_y_z_e _r_e_g_i_o_n
	      This selection starts the process  of  analyzing	the  currently
	      defined  region.	A histogram of the defined region will be dis-
	      played 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 pos-
	      sible that all of the data will not fit.	In this case, as  much
	      of  the data as possible, centered around the mean, will be dis-
	      played.  After the histograms are displayed, the	user  will  be
	      given the Signature Menu.

       _Q_u_i_t   The  user  should  make  this  selection to end the session with
	      _i_._c_l_a_s_s.


   TThhee RReeggiioonn MMeennuu
       The Region Menu contains the following selections:

       _E_r_a_s_e _r_e_g_i_o_n
	      This selection erases any currently defined region.

       _D_r_a_w _r_e_g_i_o_n
	      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.

       _R_e_s_t_o_r_e _l_a_s_t _r_e_g_i_o_n
	      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.

       _C_o_m_p_l_e_t_e _r_e_g_i_o_n
	      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.

       _D_o_n_e   Use this selection to return to the Command Menu.


TThhee RReeddiissppllaayy MMaapp MMeennuu
       The  Redisplay  Map Menu has the following selections, which are useful
       to redraw the raster maps displayed in the Map and Zoom Display Frames.

       _M_a_p _g_e_o_g_r_a_p_h_i_c _r_e_g_i_o_n
	      This selection causes the raster map in the Map Display Frame to
	      be redrawn.

       _Z_o_o_m _r_e_g_i_o_n
	      This selection causes the Zoom Display Frame to be redrawn.

       _B_o_t_h   This selection causes both the Map and Zoom Display Frames to be
	      redrawn.

       _C_a_n_c_e_l Use this selection if you do not want to redisplay either of the
	      above regions.  The user will be returned to the Command Menu.


   TThhee AAnnaallyyzzee RReeggiioonn MMeennuu
       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:

       _S_e_t _s_t_d _d_e_v_'_s
	      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 key-
	      board 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.


       Note  that  the	number in parentheses on this selection is the current
       number of standard deviations.

       _S_e_t _c_o_l_o_r
	      This selection allows the user to set the color for the  display
	      of  cells  that "match" the current signature.  The user is pre-
	      sented with a menu of color choices.  The color selected will be
	      used when the Display Matches Menu selection is made.


       Note  that  the	color  in parentheses on this selection is the current
       color for display.

       _D_i_s_p_l_a_y _m_a_t_c_h_e_s
	      This selection displays the cells that "match" the current  sig-
	      nature  in the current color.  A cell "matches" the current sig-
	      nature 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.

       _D_o_n_e   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	_i_._m_a_x_l_i_k 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.


NNOOTTEESS
       _i_._c_l_a_s_s 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.


       The cell values in the image bands cannot fall outside of the range  of
       0 to 255.  _i_._c_l_a_s_s will report an error if they do.


       _i_._c_l_a_s_s,  like  some  of  the  other imagery programs, does not use the
       standard GRASS display frames.  After running _i_._c_l_a_s_s, you will need to
       create  a display frame (e.g., using _d_._f_r_a_m_e or _d_._e_r_a_s_e) before you can
       use most of the GRASS display (d.) commands.


       _i_._g_r_o_u_p must be run before _i_._c_l_a_s_s to create an	imagery  group	and  a
       subgroup containing the image bands to be classified.


       The  user  can  perform	a  supervised  image classification by running
       _i_._c_l_a_s_s followed by _i_._m_a_x_l_i_k.  The user	can  perform  an  unsupervised
       classification by running _i_._c_l_u_s_t_e_r followed by _i_._m_a_x_l_i_k.


       _i_._c_l_a_s_s	is  interactive  and  requires no command line arguments.  The
       user must be running a graphics display monitor (see _d_._m_o_n) to run this
       program.

SSEEEE AALLSSOO
       _G_R_A_S_S _T_u_t_o_r_i_a_l_: _I_m_a_g_e _P_r_o_c_e_s_s_i_n_g


       _d_._f_r_a_m_e_,  _d_._m_o_n_,  _g_._r_e_g_i_o_n_,  _i_._c_c_a_,  _i_._c_l_u_s_t_e_r_,	_i_._c_o_m_p_o_s_i_t_e_,  _i_._g_r_o_u_p_,
       _i_._m_a_x_l_i_k_, _r_._m_a_p_c_a_l_c_, _r_._m_a_s_k

AAUUTTHHOORR
       David Satnik, Central Washington University

       _L_a_s_t _c_h_a_n_g_e_d_: _$_D_a_t_e_: _2_0_0_2_/_0_1_/_2_5 _0_5_:_4_5_:_3_3 _$



GRASS 5.0							    i.class(1)
