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

NAME

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

KEYWORDS

10       imagery, classification, supervised classification, segmentation, SMAP
11

SYNOPSIS

13       i.smap
14       i.smap --help
15       i.smap [-m]  group=name  subgroup=name  signaturefile=name  output=name
16       [goodness=name]      [blocksize=integer]      [--overwrite]    [--help]
17       [--verbose]  [--quiet]  [--ui]
18
19   Flags:
20       -m
21           Use maximum likelihood estimation (instead of smap)
22
23       --overwrite
24           Allow output files to overwrite existing files
25
26       --help
27           Print usage summary
28
29       --verbose
30           Verbose module output
31
32       --quiet
33           Quiet module output
34
35       --ui
36           Force launching GUI dialog
37
38   Parameters:
39       group=name [required]
40           Name of input imagery group
41
42       subgroup=name [required]
43           Name of input imagery subgroup
44
45       signaturefile=name [required]
46           Name of input file containing signatures
47           Generated by i.gensigset
48
49       output=name [required]
50           Name for output raster map holding classification results
51
52       goodness=name
53           Name for output raster map holding goodness of fit (lower  is  bet‐
54           ter)
55
56       blocksize=integer
57           Size of submatrix to process at one time
58           Default: 1024
59

DESCRIPTION

61       The  i.smap  program  is  used  to segment multispectral images using a
62       spectral class model known as a Gaussian mixture  distribution.   Since
63       Gaussian mixture distributions include conventional multivariate Gauss‐
64       ian distributions, this program may also be used to segment  multispec‐
65       tral images based on simple spectral mean and covariance parameters.
66
67       i.smap  has  two  modes  of operation. The first mode is the sequential
68       maximum a posteriori (SMAP) mode [1,2].  The  SMAP  segmentation  algo‐
69       rithm attempts to improve segmentation accuracy by segmenting the image
70       into regions rather than segmenting each pixel separately (see NOTES).
71
72       The second mode is the more conventional maximum likelihood (ML)  clas‐
73       sification  which  classifies each pixel separately, but requires some‐
74       what less computation. This mode is selected  with  the  -m  flag  (see
75       below).
76

OPTIONS

78   Flags:
79       -m
80           Use maximum likelihood estimation (instead of smap).  Normal opera‐
81           tion is to use SMAP estimation (see NOTES).
82
83   Parameters:
84       group=name
85           imagery group
86           The imagery group that defines the image to be classified.
87
88       subgroup=name
89           imagery subgroup
90           The subgroup within the group specified that specifies  the  subset
91           of  the  band files that are to be used as image data to be classi‐
92           fied.
93
94       signaturefile=name
95           imagery signaturefile
96           The signature file that contains the spectral signatures (i.e., the
97           statistics)  for  the  classes to be identified in the image.  This
98           signature file is produced by the program i.gensigset (see NOTES).
99
100       blocksize=value
101           size of submatrix to process at one time
102           default: 1024
103           This option specifies the size of the  "window"  to  be  used  when
104           reading the image data.
105
106       This  program  was written to be nice about memory usage without influ‐
107       encing the resultant classification. This option  allows  the  user  to
108       control  how  much  memory  is  used.   More memory may mean faster (or
109       slower) operation depending on how much real memory  your  machine  has
110       and how much virtual memory the program uses.
111
112       The  size of the submatrix used in segmenting the image has a principle
113       function of controlling memory usage; however, it also can have a  sub‐
114       tle  effect  on  the quality of the segmentation in the smap mode.  The
115       smoothing parameters for the smap segmentation are estimated separately
116       for  each submatrix.  Therefore, if the image has regions with qualita‐
117       tively different behavior, (e.g., natural woodlands and man-made  agri‐
118       cultural  fields)  it  may be useful to use a submatrix small enough so
119       that different smoothing parameters may be used  for  each  distinctive
120       region of the image.
121
122       The submatrix size has no effect on the performance of the ML segmenta‐
123       tion method.
124
125       output=name
126           output raster map.
127           The name of a raster  map  that  will  contain  the  classification
128           results.   This  new  raster map layer will contain categories that
129           can be related to landcover categories on the ground.
130

INTERACTIVE MODE

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

NOTES

136       The SMAP algorithm exploits the fact that nearby pixels in an image are
137       likely to have the same class.  It works by  segmenting  the  image  at
138       various  scales or resolutions and using the coarse scale segmentations
139       to guide the finer scale segmentations.  In addition  to  reducing  the
140       number  of  misclassifications,  the  SMAP algorithm generally produces
141       segmentations with larger connected regions of a fixed class which  may
142       be useful in some applications.
143
144       The amount of smoothing that is performed in the segmentation is depen‐
145       dent of the behavior of the data in the image.  If  the  data  suggests
146       that  the  nearby  pixels  often  change class, then the algorithm will
147       adaptively reduce the amount of smoothing.  This  ensures  that  exces‐
148       sively large regions are not formed.
149
150       The  degree of misclassifications can be investigated with the goodness
151       of fit output map. Lower values indicate a better fit. The largest 5 to
152       15% of the goodness values may need some closer inspection.
153
154       The  module  i.smap does not support MASKed or NULL cells. Therefore it
155       might be necessary to create a copy of the classification results using
156       e.g. r.mapcalc:
157
158       r.mapcalc "MASKed_map = classification_results"
159

EXAMPLE

161       Supervised classification of LANDSAT
162       g.region raster=lsat7_2002_10 -p
163       # store VIZ, NIR, MIR into group/subgroup
164       i.group group=my_lsat7_2002 subgroup=my_lsat7_2002 \
165         input=lsat7_2002_10,lsat7_2002_20,lsat7_2002_30,lsat7_2002_40,lsat7_2002_50,lsat7_2002_70
166       # Now digitize training areas "training" with the digitizer
167       # and convert to raster model with v.to.rast
168       v.to.rast input=training output=training use=cat label_column=label
169       # calculate statistics
170       i.gensigset trainingmap=training group=my_lsat7_2002 subgroup=my_lsat7_2002 \
171                   signaturefile=my_smap_lsat7_2002 maxsig=5
172       i.smap group=my_lsat7_2002 subgroup=my_lsat7_2002 signaturefile=my_smap_lsat7_2002 \
173              output=lsat7_2002_smap_classes
174       # Visually check result
175       d.mon wx0
176       d.rast.leg lsat7_2002_smap_classes
177       # Statistically check result
178       r.kappa -w classification=lsat7_2002_smap_classes reference=training
179

REFERENCES

181           ·   C.  Bouman  and  M.  Shapiro, "Multispectral Image Segmentation
182               using a Multiscale Image Model", Proc. of IEEE Int’l  Conf.  on
183               Acoust.,  Speech  and  Sig.  Proc.,  pp. III-565 - III-568, San
184               Francisco, California, March 23-26, 1992.
185
186           ·   C. Bouman and M. Shapiro 1994, "A Multiscale Random Field Model
187               for Bayesian Image Segmentation", IEEE Trans. on Image Process‐
188               ing., 3(2), 162-177" (PDF)
189
190           ·   McCauley, J.D. and B.A. Engel 1995, "Comparison of  Scene  Seg‐
191               mentations:  SMAP, ECHO and Maximum Likelyhood", IEEE Trans. on
192               Geoscience and Remote Sensing, 33(6): 1313-1316.
193

SEE ALSO

195        i.group for creating groups and subgroups
196       r.mapcalc to copy classification result in order to cut out MASKed sub‐
197       areas
198       i.gensigset to generate the signature file required by this program
199
200        g.gui.iclass, i.maxlik, i.smap, r.kappa
201

AUTHORS

203       Charles Bouman, School of Electrical Engineering, Purdue University
204
205       Michael Shapiro, U.S.Army Construction Engineering Research Laboratory
206
207       Last changed: $Date: 2014-12-19 22:17:36 +0100 (Fri, 19 Dec 2014) $
208

SOURCE CODE

210       Available at: i.smap source code (history)
211
212       Main  index | Imagery index | Topics index | Keywords index | Graphical
213       index | Full index
214
215       © 2003-2019 GRASS Development Team, GRASS GIS 7.6.0 Reference Manual
216
217
218
219GRASS 7.6.0                                                          i.smap(1)
Impressum