[GRASS-SVN] r54316 - in grass/trunk: imagery/i.cluster imagery/i.maxlik imagery/i.smap raster/r.kappa

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Dec 16 04:56:26 PST 2012


Author: neteler
Date: 2012-12-16 04:56:26 -0800 (Sun, 16 Dec 2012)
New Revision: 54316

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

Modified: grass/trunk/imagery/i.cluster/i.cluster.html
===================================================================
--- grass/trunk/imagery/i.cluster/i.cluster.html	2012-12-16 12:49:04 UTC (rev 54315)
+++ grass/trunk/imagery/i.cluster/i.cluster.html	2012-12-16 12:56:26 UTC (rev 54316)
@@ -7,7 +7,8 @@
 the second pass. Both programs must be run to complete the unsupervised 
 classification.
 
-<p><em>i.cluster</em> is a clustering algorithm that reads
+<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).
 The pixel clusters are imagery categories that can be related
@@ -17,7 +18,8 @@
 by the user.  The first parameter set by the user is the
 initial number of clusters to be discriminated.
 
-<p><center>
+<p>
+<center>
 <img src="landsat_cluster.png" border=1><br>
 <table border=0 width=590>
 <tr><td><center>
@@ -25,6 +27,7 @@
 </center></td></tr>
 </table>
 </center>
+
 <p>
 <em>i.cluster</em> starts by generating spectral signatures
 for this number of clusters and "attempts" to end up with
@@ -37,7 +40,6 @@
 the percent convergence, the maximum number of iterations,
 and the row and column sampling intervals.
 
-
 <p>
 The cluster spectral signatures that result are composed of
 cluster means and covariance matrices.  These cluster means
@@ -71,24 +73,9 @@
 discriminated; any parameter values left unspecified are
 set to their default values.
 
-<h3>Flags:</h3>
-
-<dl>
-
-<dt><b>-q</b> 
-
-<dd>Run quietly.  Suppresses output of program
-percent-complete messages and the time elapsed from the
-beginning of the program. If this flag is not used, these
-messages are printed out.
-
-</dl>
-
 <h3>Parameters:</h3>
 
 <dl>
-
-
 <dt><b>group=</b><em>name</em> 
 
 <dd>The name of the group file which contains the imagery
@@ -156,7 +143,7 @@
 
 Default: 30
 
-<A NAME="convergence"></a>
+<a name="convergence"></a>
 <dt><b>convergence=</b><em>value</em>
 
 <dd>A high percent convergence is the point at which
@@ -197,7 +184,6 @@
 (see <a href="#convergence"><em>convergence</em></a>).
 
 <br>
-
 Default: 0.0
 
 <dt><b>min_size=</b><em>value</em> 
@@ -208,7 +194,6 @@
 calculated.
 
 <br>
-
 Default: 17
 
 <A NAME="reportfile"></a>
@@ -221,7 +206,6 @@
 achieve the convergence, and the separability matrix.
 </dl>
 
-
 <h2>NOTES</h2>
 
 Running in command line mode, <em>i.cluster</em> will
@@ -229,6 +213,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>
@@ -236,6 +238,7 @@
 Processing manual</a></em>
 
 <p>
+
 <em>
 <a href="i.class.html">i.class</a>,
 <a href="i.group.html">i.group</a>,

Modified: grass/trunk/imagery/i.maxlik/i.maxlik.html
===================================================================
--- grass/trunk/imagery/i.maxlik/i.maxlik.html	2012-12-16 12:49:04 UTC (rev 54315)
+++ grass/trunk/imagery/i.maxlik/i.maxlik.html	2012-12-16 12:56:26 UTC (rev 54316)
@@ -5,7 +5,8 @@
 step in either an unsupervised or a supervised image
 classification.
 
-<p>Either image classification methods are performed in two
+<p>
+Either image classification methods are performed in two
 steps.  The first step in an unsupervised image
 classification is performed by
 <em><a href="i.cluster.html">i.cluster</a></em>; the
@@ -15,7 +16,8 @@
 the second step in the image classification procedure is
 performed by <em>i.maxlik</em>.
 
-<p>In an unsupervised classification, the maximum-likelihood
+<p>
+In an unsupervised classification, the maximum-likelihood
 classifier uses the cluster means and covariance matrices
 from the <em><a href="i.cluster.html">i.cluster</a></em>
 signature file to determine to which category (spectral
@@ -29,13 +31,15 @@
 to which category each cell in the image has the highest
 probability of belonging.
 
-<p>In either case, the raster map layer output by
+<p>
+In either case, the raster map layer output by
 <em>i.maxlik</em> is a classified image in which each cell
 has been assigned to a spectral class (i.e., a category).
 The spectral classes (categories) can be related to
 specific land cover types on the ground.
 
-<p>The program will run non-interactively if the user
+<p>
+The program will run non-interactively if the user
 specifies the names of raster map layers, i.e., group and
 subgroup names, seed signature file name, result
 classification file name, and any combination of
@@ -57,20 +61,8 @@
 the user will be prompted for the program parameter
 settings; the program will run foreground.
 
-
 <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>
@@ -120,7 +112,6 @@
 possible uses for this map layer is as a mask, to identify
 cells in the classified image that have the lowest
 probability of being assigned to the correct class.
-
 </dl>
 
 
@@ -140,24 +131,42 @@
 <em>i.maxlik</em>
 will reject them and display a warning message.
 
-<p>This program runs interactively if the user types
+<p>
+This program runs interactively if the user types
 <em>i.maxlik</em> only. If the user types <em>i.maxlik</em>
 along with all required options, it will overwrite the
 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 wx0
+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>
 <a href="http://grass.osgeo.org/gdp/imagery/grass4_image_processing.pdf">Image
 Processing manual</a></em>
 
-<p><em>
+<p>
+<em>
 <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="i.group.html">i.group</a>,
+<a href="r.kappa.html">r.kappa</a>
 </em>
 
 <h2>AUTHORS</h2>
@@ -171,4 +180,5 @@
 University of Illinois at Urbana-Champaign,
 Illinois
 
-<p><i>Last changed: $Date$</i>
+<p>
+<i>Last changed: $Date$</i>

Modified: grass/trunk/imagery/i.smap/i.smap.html
===================================================================
--- grass/trunk/imagery/i.smap/i.smap.html	2012-12-16 12:49:04 UTC (rev 54315)
+++ grass/trunk/imagery/i.smap/i.smap.html	2012-12-16 12:56:26 UTC (rev 54316)
@@ -1,6 +1,5 @@
 <h2>DESCRIPTION</h2>
 
-
 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
@@ -10,7 +9,7 @@
 covariance parameters.
 
 <p>
-<em>i.smap</em> has two modes of operation.  The first mode
+<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
 segmentation algorithm attempts to improve segmentation
@@ -18,7 +17,6 @@
 segmenting each pixel separately 
 (see <a href="#notes">NOTES</a>).
 
-
 <p>
 The second mode is the more conventional maximum likelihood (ML)
 classification which classifies each pixel separately,
@@ -30,22 +28,17 @@
 <h3>Flags:</h3>
 
 <dl>
-
 <dt><b>-m</b>
-
 <dd>Use maximum likelihood estimation (instead of smap).
 Normal operation is to use SMAP estimation (see
 <a href="#notes">NOTES</a>).
 
 <dt><b>-q</b> 
-
 <dd>Run quietly, without printing messages about program
 progress.  Without this flag, messages will be printed (to
 stderr) as the program progresses.
-
 </dl>
 
-
 <h3>Parameters:</h3>
 
 <dl>
@@ -118,7 +111,7 @@
 <em>i.smap</em> will interactively prompt for the names of
 the maps and files.
 
-<A NAME="notes"></a><h2>NOTES</h2>
+<a name="notes"></a><h2>NOTES</h2>
 
 The SMAP algorithm exploits the fact that nearby pixels in
 an image are likely to have the same class.  It works by
@@ -138,11 +131,43 @@
 excessively large regions are not formed.
 
 <p>
-The module i.smap does not support MASKed or NULL cells. Therefore 
+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>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 wx0
+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>
@@ -179,9 +204,10 @@
 <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/trunk/raster/r.kappa/r.kappa.html
===================================================================
--- grass/trunk/raster/r.kappa/r.kappa.html	2012-12-16 12:49:04 UTC (rev 54315)
+++ grass/trunk/raster/r.kappa/r.kappa.html	2012-12-16 12:56:26 UTC (rev 54316)
@@ -5,7 +5,8 @@
 overall <em>kappa</em> (accompanied by its <em>variance</em>) and
 conditional <em>kappa</em> values are calculated.  This analysis program
 respects the current geographic region and mask settings.
-<p><em>r.kappa</em> calculates the error matrix of the
+<p>
+<em>r.kappa</em> calculates the error matrix of the
 two map layers and prepares the table from which the report
 is to be created.  <em>kappa</em> values for overall and
 each classes are computed along with their variances. Also
@@ -14,12 +15,13 @@
 counts and percentage of overall correctly classified
 pixels are tabulated.
 
-<p>The report will be write to an output file which is in
+<p>
+The report will be write to an output file which is in
 plain text format and named by user at prompt of running
 the program.
 
-
-<p>The body of the report is arranged in panels.  The
+<p>
+The body of the report is arranged in panels.  The
 classified result map layer categories is arranged along
 the vertical axis of the table, while the reference map
 layer categories along the horizontal axis.  Each panel has
@@ -44,6 +46,14 @@
 <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>,
@@ -58,4 +68,5 @@
 
 Tao Wen, University of Illinois at Urbana-Champaign, Illinois
 
-<p><i>Last changed: $Date$</i>
+<p>
+<i>Last changed: $Date$</i>



More information about the grass-commit mailing list