[GRASS-SVN] r54314 - in grass/branches/releasebranch_6_4: imagery/i.cluster imagery/i.maxlik imagery/i.smap/shapiro raster/r.kappa

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Dec 16 04:47:36 PST 2012


Author: neteler
Date: 2012-12-16 04:47:36 -0800 (Sun, 16 Dec 2012)
New Revision: 54314

Modified:
   grass/branches/releasebranch_6_4/imagery/i.cluster/description.html
   grass/branches/releasebranch_6_4/imagery/i.maxlik/description.html
   grass/branches/releasebranch_6_4/imagery/i.smap/shapiro/description.html
   grass/branches/releasebranch_6_4/raster/r.kappa/description.html
Log:
examples added; HTML cosmetics

Modified: grass/branches/releasebranch_6_4/imagery/i.cluster/description.html
===================================================================
--- grass/branches/releasebranch_6_4/imagery/i.cluster/description.html	2012-12-16 12:17:33 UTC (rev 54313)
+++ grass/branches/releasebranch_6_4/imagery/i.cluster/description.html	2012-12-16 12:47:36 UTC (rev 54314)
@@ -1,6 +1,5 @@
 <h2>DESCRIPTION</h2>
 
-
 <em>i.cluster</em>
 performs the first pass in the GRASS two-pass unsupervised 
 classification of imagery, while the GRASS program <em>
@@ -9,7 +8,6 @@
 classification.
 
 <p>
-
 <em>i.cluster</em> is a clustering algorithm that reads
 through the (raster) imagery data and builds pixel clusters
 based on the spectral reflectances of the pixels (see Figure).
@@ -223,10 +221,8 @@
 included are the resulting percent convergence for the
 clusters, the number of iterations that was required to
 achieve the convergence, and the separability matrix.
-
 </dl>
 
-
 <h2>NOTES</h2>
 
 Running in command line mode, <em>i.cluster</em> will
@@ -234,6 +230,24 @@
 required by the user) without prompting if the files
 existed.
 
+<h2>EXAMPLE</h2>
+
+Preparing the statistics for unsupervised classification of
+a LANDSAT subscene in North Carolina:
+
+<div class="code"><pre>
+g.region rast=lsat7_2002_10 -p
+
+# store VIZ, NIR, MIR into group/subgroup
+i.group group=my_lsat7_2002 subgroup=my_lsat7_2002 \
+  input=lsat7_2002_10,lsat7_2002_20,lsat7_2002_30,lsat7_2002_40,lsat7_2002_50,lsat7_2002_70
+
+i.cluster group=my_lsat7_2002 subgroup=my_lsat7_2002 sigfile=sig_clust_lsat2002 \
+          classes=10 report=rep_clust_lsat2002.txt
+</pre></div>
+
+To complete the unsupervised classification, <em>i.maxlik</em> is subsequently used.
+
 <h2>SEE ALSO</h2>
 
 The GRASS 4 <em>

Modified: grass/branches/releasebranch_6_4/imagery/i.maxlik/description.html
===================================================================
--- grass/branches/releasebranch_6_4/imagery/i.maxlik/description.html	2012-12-16 12:17:33 UTC (rev 54313)
+++ grass/branches/releasebranch_6_4/imagery/i.maxlik/description.html	2012-12-16 12:47:36 UTC (rev 54314)
@@ -68,16 +68,6 @@
 <h2>OPTIONS</h2>
 
 
-<h3>Flags:</h3>
-
-<dl>
-
-<dt><b>-q</b> 
-
-<dd>Run quietly, without printing program messages to standard output.
-
-</dl>
-
 <h3>Parameters:</h3>
 
 <dl>
@@ -153,6 +143,22 @@
 classified raster map without prompting if this map
 existed.
 
+<h2>EXAMPLE</h2>
+
+Completion of the unsupervised classification of
+a LANDSAT subscene (VIZ, NIR, MIR channels) in North Carolina
+(see <em>i.cluster</em> manual page for the first part):
+
+<div class="code"><pre>
+i.maxlik group=my_lsat7_2002 subgroup=my_lsat7_2002 sigfile=sig_clust_lsat2002 \
+          class=lsat7_2002_clust_classes reject=lsat7_2002_clust_classes.rej
+
+# Visually check result
+d.mon x0
+d.rast.leg lsat7_2002_clust_classes
+d.rast.leg lsat7_2002_clust_classes.rej
+</pre></div>
+
 <h2>SEE ALSO</h2>
 
 The GRASS 4 <em>
@@ -161,10 +167,11 @@
 
 <p>
 <em>
-<a href="i.class.html">i.class</a><br>
-<a href="i.cluster.html">i.cluster</a><br>
-<a href="i.gensig.html">i.gensig</a><br>
-<a href="i.group.html">i.group</a>
+<a href="i.class.html">i.class</a>,
+<a href="i.cluster.html">i.cluster</a>,
+<a href="i.gensig.html">i.gensig</a>,
+<a href="i.group.html">i.group</a>,
+<a href="r.kappa.html">r.kappa</a>
 </em>
 
 <h2>AUTHORS</h2>

Modified: grass/branches/releasebranch_6_4/imagery/i.smap/shapiro/description.html
===================================================================
--- grass/branches/releasebranch_6_4/imagery/i.smap/shapiro/description.html	2012-12-16 12:17:33 UTC (rev 54313)
+++ grass/branches/releasebranch_6_4/imagery/i.smap/shapiro/description.html	2012-12-16 12:47:36 UTC (rev 54314)
@@ -1,7 +1,6 @@
-<H2>DESCRIPTION</H2>
+<h2>DESCRIPTION</h2>
 
-
-The <EM>i.smap</EM> program is used to segment
+The <em>i.smap</em> 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 Gaussian
@@ -9,78 +8,73 @@
 multispectral images based on simple spectral mean and
 covariance parameters.
 
-<P>
-
-<EM>i.smap</EM> has two modes of operation.  The first mode
+<p><em>i.smap</em> has two modes of operation.  The first mode
 is the sequential maximum a posteriori (SMAP) mode
-[<A HREF="#ref1">1</A>,<A HREF="#ref2">2</A>].  The SMAP
+[<a href="#ref1">1</a>,<a href="#ref2">2</a>].  The SMAP
 segmentation algorithm attempts to improve segmentation
 accuracy by segmenting the image into regions rather than
 segmenting each pixel separately 
-(see <A HREF="#notes">NOTES</A>).
+(see <a href="#notes">NOTES</a>).
 
 
-<P>
-
-The second mode is the more conventional maximum likelihood (ML)
+<p>The second mode is the more conventional maximum likelihood (ML)
 classification which classifies each pixel separately,
 but requires somewhat less computation. This mode is selected with
-the <B>-m</B> flag (see <A HREF="#mflag.html">below</A>).
+the <b>-m</b> flag (see <a href="#mflag.html">below</a>).
 
-<H2>OPTIONS</H2>
+<h2>OPTIONS</h2>
 
-<H3>Flags:</H3>
+<h3>Flags:</h3>
 
-<DL>
+<dl>
 
-<DT><B>-m</B></A>
+<dt><b>-m</b></a>
 
-<DD>Use maximum likelihood estimation (instead of smap).
+<dd>Use maximum likelihood estimation (instead of smap).
 Normal operation is to use SMAP estimation (see
-<A HREF="#notes">NOTES</A>).
+<a href="#notes">NOTES</a>).
 
-<DT><B>-q</B> 
+<dt><b>-q</b> 
 
-<DD>Run quietly, without printing messages about program
+<dd>Run quietly, without printing messages about program
 progress.  Without this flag, messages will be printed (to
 stderr) as the program progresses.
 
-</DL>
+</dl>
 
 
-<H3>Parameters:</H3>
+<h3>Parameters:</h3>
 
-<DL>
-<DT><B>group=</B><EM>name</EM> 
+<dl>
+<dt><b>group=</b><em>name</em> 
 
-<DD>imagery group<BR>
+<dd>imagery group<br>
 The imagery group that defines the image to be classified.
 
-<DT><B>subgroup=</B><EM>name</EM> 
+<dt><b>subgroup=</b><em>name</em> 
 
-<DD>imagery subgroup<BR>
+<dd>imagery subgroup<br>
 The subgroup within the group specified that specifies the
 subset of the band files that are to be used as image data
 to be classified.
 
-<DT><B>signaturefile=</B><EM>name</EM> 
+<dt><b>signaturefile=</b><em>name</em> 
 
-<DD>imagery signaturefile<BR>
+<dd>imagery signaturefile<br>
 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
-<EM><A HREF="i.gensigset.html">i.gensigset</A></EM>
-(see <A HREF="#notes">NOTES</A>).
+<em><a href="i.gensigset.html">i.gensigset</a></em>
+(see <a href="#notes">NOTES</a>).
 
-<DT><B>blocksize=</B><EM>value</EM> 
+<dt><b>blocksize=</b><em>value</em> 
 
-<DD>size of submatrix to process at one time<BR>
-default: 128<BR>
+<dd>size of submatrix to process at one time<br>
+default: 128<br>
 This option specifies the size of the "window" to be used when
 reading the image data. 
 
-<P>
-
+<p>
 This program was written to be nice about memory usage
 without influencing the resultant classification. This
 option allows the user to control how much memory is used.
@@ -88,8 +82,7 @@
 on how much real memory your machine has and how much
 virtual memory the program uses.
 
-<P>
-
+<p>
 The size of the submatrix used in segmenting the image has
 a principle function of controlling memory usage; however,
 it also can have a subtle effect on the quality of the
@@ -102,28 +95,27 @@
 parameters may be used for each distinctive region of the
 image.
 
-<P>
-
+<p>
 The submatrix size has no effect on the performance of the
 ML segmentation method.
 
-<DT><B>output=</B><EM>name</EM>
+<dt><b>output=</b><em>name</em>
 
-<DD>output raster map.<BR>
+<dd>output raster map.<br>
 The name of a raster map that will contain the
 classification results.  This new raster map layer will
 contain categories that can be related to landcover
 categories on the ground.
 
-</DL>
+</dl>
 
-<H2>INTERACTIVE MODE</H2>
+<h2>INTERACTIVE MODE</h2>
 
 If none of the arguments are specified on the command line,
-<EM>i.smap</EM> will interactively prompt for the names of
+<em>i.smap</em> will interactively prompt for the names of
 the maps and files.
 
-<A NAME="notes"><H2>NOTES</H2></A>
+<a name="notes"><h2>NOTES</h2></a>
 
 The SMAP algorithm exploits the fact that nearby pixels in
 an image are likely to have the same class.  It works by
@@ -134,8 +126,7 @@
 segmentations with larger connected regions of a fixed
 class which may be useful in some applications.
 
-<P>
-
+<p>
 The amount of smoothing that is performed in the
 segmentation is dependent of the behavior of the data in
 the image.  If the data suggests that the nearby pixels
@@ -143,16 +134,46 @@
 reduce the amount of smoothing.  This ensures that
 excessively large regions are not formed.
 
-<P>
-
-The module i.smap does not support MASKed or NULL cells. Therefore 
+<p>
+The module <em>i.smap</em> 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. 
-<p>
-r.mapcalc  MASKed_map=classification results 
+using e.g. r.mapcalc:
+<p><div class="code"><pre>
+r.mapcalc "MASKed_map = classification_results"
+</pre></div>
 
-<H2>REFERENCES</H2>
+<h2>EXAMPLE</h2>
 
+Supervised classification of LANDSAT
+
+<div class="code"><pre>
+g.region rast=lsat7_2002_10 -p
+
+# store VIZ, NIR, MIR into group/subgroup
+i.group group=my_lsat7_2002 subgroup=my_lsat7_2002 \
+  input=lsat7_2002_10,lsat7_2002_20,lsat7_2002_30,lsat7_2002_40,lsat7_2002_50,lsat7_2002_70
+
+# Now digitize training areas "training" with the digitizer
+# and convert to raster model with v.to.rast
+v.to.rast training out=training use=cat labelcolumn=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 \
+       output=lsat7_2002_smap_classes
+
+# Visually check result
+d.mon x0
+d.rast.leg lsat7_2002_smap_classes
+
+# Statistically check result
+r.kappa -w classification=lsat7_2002_smap_classes reference=training
+</pre></div>
+
+<h2>REFERENCES</h2>
+
 <ul>
 <li>C. Bouman and M. Shapiro,
 "Multispectral Image Segmentation using a Multiscale Image Model", 
@@ -169,29 +190,28 @@
 <em>IEEE Trans. on Geoscience and Remote Sensing, 33(6): 1313-1316.</em>
 </ul>
 
-<H2>SEE ALSO</H2>
+<h2>SEE ALSO</h2>
 
-<EM><A HREF="i.group.html">i.group</A></EM>
+<em><a href="i.group.html">i.group</a></em>
 for creating groups and subgroups
 
-<P>
-
-<EM><A HREF="r.mapcalc.html">r.mapcalc</A></EM>
+<p>
+<em><a href="r.mapcalc.html">r.mapcalc</a></em>
 to copy classification result in order to cut out MASKed subareas
 
-<P>
-
-<EM><A HREF="i.gensigset.html">i.gensigset</A></EM>
+<p>
+<em><a href="i.gensigset.html">i.gensigset</a></em>
 to generate the signature file required by this program
 
-<H2>AUTHORS</H2>
+<h2>AUTHORS</h2>
 
-<a href=http://dynamo.ecn.purdue.edu/~bouman/software/segmentation/>Charles Bouman, 
+<a href="http://dynamo.ecn.purdue.edu/~bouman/software/segmentation/">Charles Bouman, 
 School of Electrical Engineering, Purdue University</a>
 
-<BR>
+<p>
 Michael Shapiro,
 U.S.Army Construction Engineering 
 Research Laboratory
 
-<p><i>Last changed: $Date$</i>
+<p>
+<i>Last changed: $Date$</i>

Modified: grass/branches/releasebranch_6_4/raster/r.kappa/description.html
===================================================================
--- grass/branches/releasebranch_6_4/raster/r.kappa/description.html	2012-12-16 12:17:33 UTC (rev 54313)
+++ grass/branches/releasebranch_6_4/raster/r.kappa/description.html	2012-12-16 12:47:36 UTC (rev 54314)
@@ -1,6 +1,5 @@
 <h2>DESCRIPTION</h2>
 
-
 <em>r.kappa</em> tabulates the error matrix of classification result by
 crossing classified map layer with respect to reference map layer.  Both
 overall <em>kappa</em> (accompanied by its <em>variance</em>) and
@@ -21,7 +20,6 @@
 plain text format and named by user at prompt of running
 the program.
 
-
 <p>
 The body of the report is arranged in panels.  The
 classified result map layer categories is arranged along
@@ -45,10 +43,17 @@
 information for each and every category.
 
 <p>
-
 <em>NA</em>'s in output file mean non-applicable in case
 <em>MASK</em> exists.
 
+<H2>EXAMPLE</H2>
+
+Verification of classified LANDSAT scene against training areas:
+
+<div class="code"><pre>
+r.kappa -w classification=lsat7_2002_classes reference=training
+</pre></div>
+
 <h2>SEE ALSO</h2>
 
 <em><a href="g.region.html">g.region</a></em>,



More information about the grass-commit mailing list