Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages


home | help
i.smap(1)		    GRASS GIS User's Manual		     i.smap(1)

       i.smap	-  Performs  contextual	 image classification using sequential
       maximum a posteriori (SMAP) estimation.

       imagery,	classification,	supervised classification, segmentation, SMAP

       i.smap --help
       i.smap [-m]  group=name	subgroup=name  signaturefile=name  output=name
       [goodness=name]	    [blocksize=integer]	     [--overwrite]    [--help]
       [--verbose]  [--quiet]  [--ui]

	   Use maximum likelihood estimation (instead of smap)

	   Allow output	files to overwrite existing files

	   Print usage summary

	   Verbose module output

	   Quiet module	output

	   Force launching GUI dialog

       group=nameA [required]
	   Name	of input imagery group

       subgroup=nameA [required]
	   Name	of input imagery subgroup

       signaturefile=nameA [required]
	   Name	of input file containing signatures
	   Generated by	i.gensigset

       output=nameA [required]
	   Name	for output raster map holding classification results

	   Name	for output raster map holding goodness of fit (lower  is  bet-

	   Size	of submatrix to	process	at one time
	   Default: 1024

       The  i.smap  program  is	 used  to segment multispectral	images using a
       spectral	class model known as a Gaussian	mixture	 distribution.	 Since
       Gaussian	mixture	distributions include conventional multivariate	Gauss-
       ian distributions, this program may also	be used	to segment  multispec-
       tral images based on simple spectral mean and covariance	parameters.

       i.smap  has  two	 modes	of operation. The first	mode is	the sequential
       maximum a posteriori (SMAP) mode	[1,2].	The  SMAP  segmentation	 algo-
       rithm attempts to improve segmentation accuracy by segmenting the image
       into regions rather than	segmenting each	pixel separately (see NOTES).

       The second mode is the more conventional	maximum	likelihood (ML)	 clas-
       sification  which  classifies each pixel	separately, but	requires some-
       what less computation. This mode	is selected with the -m	flag (see  be-

	   Use maximum likelihood estimation (instead of smap).	 Normal	opera-
	   tion	is to use SMAP estimation (see NOTES).

	   imagery group
	   The imagery group that defines the image to be classified.

	   imagery subgroup
	   The subgroup	within the group specified that	specifies  the	subset
	   of  the  band files that are	to be used as image data to be classi-

	   imagery signaturefile
	   The signature file that contains the	spectral signatures (i.e., the
	   statistics)	for  the  classes to be	identified in the image.  This
	   signature file is produced by the program i.gensigset (see NOTES).

	   size	of submatrix to	process	at one time
	   default: 1024
	   This	option specifies the size of the  "window"  to	be  used  when
	   reading the image data.

       This  program  was written to be	nice about memory usage	without	influ-
       encing the resultant classification. This option	 allows	 the  user  to
       control	how  much  memory  is  used.   More memory may mean faster (or
       slower) operation depending on how much real memory  your  machine  has
       and how much virtual memory the program uses.

       The  size of the	submatrix used in segmenting the image has a principle
       function	of controlling memory usage; however, it also can have a  sub-
       tle  effect  on	the quality of the segmentation	in the smap mode.  The
       smoothing parameters for	the smap segmentation are estimated separately
       for  each submatrix.  Therefore,	if the image has regions with qualita-
       tively different	behavior, (e.g., natural woodlands and man-made	 agri-
       cultural	 fields)  it  may be useful to use a submatrix small enough so
       that different smoothing	parameters may be used	for  each  distinctive
       region of the image.

       The submatrix size has no effect	on the performance of the ML segmenta-
       tion method.

	   output raster map.
	   The name of a raster	map that will contain the  classification  re-
	   sults.   This new raster map	layer will contain categories that can
	   be related to landcover categories on the ground.

       If none of the arguments	are specified on the command line, i.smap will
       interactively prompt for	the names of the maps and files.

       The SMAP	algorithm exploits the fact that nearby	pixels in an image are
       likely to have the same class.  It works	by  segmenting	the  image  at
       various	scales or resolutions and using	the coarse scale segmentations
       to guide	the finer scale	segmentations.	In addition  to	 reducing  the
       number  of  misclassifications,	the  SMAP algorithm generally produces
       segmentations with larger connected regions of a	fixed class which  may
       be useful in some applications.

       The amount of smoothing that is performed in the	segmentation is	depen-
       dent of the behavior of the data	in the image.  If  the	data  suggests
       that  the  nearby  pixels  often	 change	class, then the	algorithm will
       adaptively reduce the amount of smoothing.  This	 ensures  that	exces-
       sively large regions are	not formed.

       The  degree of misclassifications can be	investigated with the goodness
       of fit output map. Lower	values indicate	a better fit. The largest 5 to
       15% of the goodness values may need some	closer inspection.

       The  module  i.smap does	not support MASKed or NULL cells. Therefore it
       might be	necessary to create a copy of the classification results using
       e.g. r.mapcalc:

       r.mapcalc "MASKed_map = classification_results"

       Supervised classification of LANDSAT
       g.region	raster=lsat7_2002_10 -p
       # store VIZ, NIR, MIR into group/subgroup group=my_lsat7_2002 subgroup=my_lsat7_2002 \
       # Now digitize training areas "training"	with the digitizer
       # and convert to	raster model with input=training	output=training	use=cat	label_column=label
       # calculate statistics
       i.gensigset trainingmap=training	group=my_lsat7_2002 subgroup=my_lsat7_2002 \
		   signaturefile=my_smap_lsat7_2002 maxsig=5
       i.smap group=my_lsat7_2002 subgroup=my_lsat7_2002 signaturefile=my_smap_lsat7_2002 \
       # Visually check	result
       d.mon wx0
       d.rast.leg lsat7_2002_smap_classes
       # Statistically check result
       r.kappa -w classification=lsat7_2002_smap_classes reference=training

	   o   C. Bouman and M.	Shapiro, "Multispectral	Image Segmentation us-
	       ing a Multiscale	Image Model", Proc. of	IEEE  Int'l  Conf.  on
	       Acoust.,	 Speech	 and  Sig.  Proc.,  pp.	III-565	- III-568, San
	       Francisco, California, March 23-26, 1992.

	   o   C. Bouman and M.	Shapiro	1994, "A Multiscale Random Field Model
	       for Bayesian Image Segmentation", IEEE Trans. on	Image Process-
	       ing., 3(2), 162-177" (PDF)

	   o   McCauley, J.D. and B.A. Engel 1995, "Comparison of  Scene  Seg-
	       mentations:  SMAP, ECHO and Maximum Likelyhood",	IEEE Trans. on
	       Geoscience and Remote Sensing, 33(6): 1313-1316.

SEE ALSO	for creating groups and	subgroups
       r.mapcalc to copy classification	result in order	to cut out MASKed sub-
       i.gensigset to generate the signature file required by this program

	g.gui.iclass, i.maxlik,	r.kappa

       Charles Bouman, School of Electrical Engineering, Purdue	University

       Michael Shapiro,	U.S.Army Construction Engineering Research Laboratory

       Available at: i.smap source code	(history)

       Main  index | Imagery index | Topics index | Keywords index | Graphical
       index | Full index

       A(C) 2003-2021 GRASS Development	Team, GRASS GIS	7.8.6 Reference	Manual

GRASS 7.8.6							     i.smap(1)


Want to link to this manual page? Use this URL:

home | help